remove hro only email validation
This commit is contained in:
parent
2c9e882f2f
commit
67acc5ec56
@ -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…
Reference in New Issue
Block a user