password lenght
This commit is contained in:
@@ -12,7 +12,7 @@ def validate_password(password: str):
|
||||
return validate(password, reg)
|
||||
|
||||
def validate_username(username: str):
|
||||
if not 6 <= len(username.split(' ')) <= 15:
|
||||
if not 6 <= len(username.split(' ')) <= 20:
|
||||
return {
|
||||
'name': 'Username must be between 6 and 15 words'
|
||||
}
|
||||
@@ -27,7 +27,7 @@ def validate_username_and_password(username, password):
|
||||
}
|
||||
if not validate_username(username):
|
||||
return {
|
||||
'email': 'Username is invalid'
|
||||
'username': 'Username is invalid'
|
||||
}
|
||||
if not validate_password(password):
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user