remove hro only email validation

This commit is contained in:
crunk 2024-04-21 21:08:51 +02:00
parent 2c9e882f2f
commit 67acc5ec56

View File

@ -8,10 +8,6 @@ from wtforms.validators import Email, EqualTo, Length, ValidationError
class RegisterForm(FlaskForm):
"""Register for distribusi-verse form class"""
def hremail(form, field):
if not field.data.endswith("@hr.nl"):
raise ValidationError("Only HRO accounts are allowed.")
username = StringField(
"Username:",
validators=[validators.InputRequired(), Length(3, 150)],
@ -22,8 +18,7 @@ class RegisterForm(FlaskForm):
validators=[
validators.InputRequired(),
Email(),
Length(6, 64),
hremail,
Length(6, 128),
],
)