Browse Source

remove hro only email validation

pull/11/head
crunk 2 months ago
parent
commit
67acc5ec56
  1. 7
      verse/forms/registerform.py

7
verse/forms/registerform.py

@ -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),
],
)

Loading…
Cancel
Save