check if username is alphanumeric
This commit is contained in:
parent
f8783885f6
commit
39377d8c9b
@ -1,6 +1,8 @@
|
|||||||
def check_username(username):
|
def check_username(username):
|
||||||
if not username:
|
if not username:
|
||||||
return False
|
return False
|
||||||
|
if not username.isalnum():
|
||||||
|
return False
|
||||||
if not username == username.strip():
|
if not username == username.strip():
|
||||||
return False
|
return False
|
||||||
if not len(username) < 16:
|
if not len(username) < 16:
|
||||||
|
Loading…
Reference in New Issue
Block a user