simplify form code

This commit is contained in:
Patrick Jentsch
2022-04-19 11:48:14 +02:00
parent d35ca7c261
commit de4a83582d
3 changed files with 24 additions and 26 deletions

View File

@ -23,7 +23,7 @@ class RegistrationForm(FlaskForm):
username = StringField('Username',
validators=[
InputRequired(),
Length(min=1, max=64),
Length(1, 64),
Regexp(
USERNAME_REGEX,
message='Usernames must have only letters, numbers, dots or underscores' # noqa