Skip to content

Commit 309680a

Browse files
committed
Revert "Allow usernames with numbers"
This reverts commit 7a84dcc.
1 parent 7a84dcc commit 309680a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ocflib/account/validators.py

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ def validate_username(username, check_exists=False):
344344
if not 3 <= len(username) <= 16:
345345
raise ValueError('Username must be between 3 and 16 characters.')
346346

347+
if not all(c.islower() for c in username):
348+
raise ValueError('Username must be all lowercase letters.')
349+
347350
if check_exists and not user_exists(username):
348351
raise ValueError('Username does not exist.')
349352

0 commit comments

Comments
 (0)