Don't allow handles that start with numbers. (#103)
The first character of nicks can't be a digit according to the IRC protcol, compliant servers won't allow it.
This commit is contained in:
parent
8d1bef4db2
commit
38651d7ca7
1 changed files with 2 additions and 0 deletions
|
@ -597,6 +597,8 @@ class PesterProfile(object):
|
|||
return (False, "Cannot start with uppercase letter")
|
||||
if re.search("[^A-Za-z0-9]", handle) is not None:
|
||||
return (False, "Only alphanumeric characters allowed")
|
||||
if handle[0].isnumeric(): # IRC doesn't allow this
|
||||
return (False, "Handles may not start with a number")
|
||||
return (True,)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue