Better error handling for user registration, better alerts

This commit is contained in:
Sander Ferdinand 2018-07-01 01:16:37 +02:00
parent 40705e5a34
commit 4044c5c644
6 changed files with 38 additions and 18 deletions

7
wowfunding/validation.py Normal file
View file

@ -0,0 +1,7 @@
def val_username(value):
if len(value) >= 20:
raise Exception("username too long")
def val_email(value):
if len(value) >= 50:
raise Exception("email too long")