Browse Source

Validate username format in what seem to be WIP API?

uid-validation
fnux 2 years ago
parent
commit
26916f7def
  1. 4
      dal/views.py

4
dal/views.py

@ -511,6 +511,10 @@ class UserCreateAPI(APIView):
if username == "" or not username:
return Response('Please supply a username.', 400)
if not is_username_valid(username):
return Response('Username is not valid.', 400)
try:
validate_email(email)
except ValidationError:

Loading…
Cancel
Save