force lower case username

This commit is contained in:
tuxcoder 2024-01-02 18:07:55 +01:00
parent 17b044b1a2
commit bdefee9d58

View file

@ -30,7 +30,7 @@ class ConsentForm(FlaskForm):
class RegistrationForm(FlaskForm):
username = StringField(gettext('Username'), validators=[
DataRequired(),
Regexp('^[a-zA-Z0-9-.]+$', message=gettext('Only `a-z`, `A-Z`, `0-9`, `-.` is allowed for username'))
Regexp('^[a-z0-9-.]+$', message=gettext('Only `a-z`, `0-9`, `-.` is allowed for username'))
])
password = PasswordField(gettext('Password'), validators=[
DataRequired(),