Add more info to username has spaces error message

master
Tanner Collin 2 years ago
parent 5d35910b4d
commit a93ac00120
  1. 2
      apiserver/apiserver/api/serializers.py

@ -781,7 +781,7 @@ class MyLoginSerializer(LoginSerializer):
raise ValidationError(dict(username='*server explodes*'))
if ' ' in username:
raise ValidationError(dict(username='Username shouldn\'t have spaces.'))
raise ValidationError(dict(username='Username shouldn\'t have spaces. Try "first.last" or "first.middle.last".'))
if 'first.last' in username:
raise ValidationError(dict(username='Don\'t literally try "first.last", use your own name.'))

Loading…
Cancel
Save