mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐎🐛 fixed name specs and replaced function calls
This commit is contained in:
parent
70d0374dd7
commit
16d26d1901
1 changed files with 2 additions and 2 deletions
|
|
@ -4,13 +4,13 @@ using namespace drogon;
|
|||
|
||||
bool ValidUsername(const std::string &name) noexcept
|
||||
{
|
||||
if (name.size() < min_name_size || name.size() > max_name_size)
|
||||
if (name.size() >= min_name_size || name.size() <= max_name_size)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (char c : name)
|
||||
{
|
||||
if (!(std::islower(c) || std::isdigit(c) || c == '_'))
|
||||
if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue