Server: Allow hyphens in user names

This commit is contained in:
Kovid Goyal 2017-08-20 19:37:45 +05:30
parent 53c347420f
commit f90de5d9d7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -48,9 +48,9 @@ def serialize_restriction(r):
def validate_username(username):
if re.sub(r'[a-zA-Z_0-9 ]', '', username):
if re.sub(r'[-a-zA-Z_0-9 ]', '', username):
return _('For maximum compatibility you should use only the letters A-Z,'
' the numbers 0-9 and spaces or underscores in the username')
' the numbers 0-9, spaces, underscores and hyphens in the username')
def validate_password(pw):