More detailed namespace validation
Fixes namespace validation to use the proper regex for checking length, as well as showing the proper messaging if the entered namespace is invalid [Delivers #137830461]
This commit is contained in:
parent
aafcb592a6
commit
462f47924e
7 changed files with 11 additions and 14 deletions
|
@ -57,7 +57,7 @@ def create_user_noverify(username, email, email_required=True, prompts=tuple()):
|
|||
|
||||
(username_valid, username_issue) = validate_username(username)
|
||||
if not username_valid:
|
||||
raise InvalidUsernameException('Invalid username %s: %s' % (username, username_issue))
|
||||
raise InvalidUsernameException('Invalid namespace %s: %s' % (username, username_issue))
|
||||
|
||||
try:
|
||||
existing = User.get((User.username == username) | (User.email == email))
|
||||
|
|
Reference in a new issue