mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-02 23:17:26 +02:00
Add a format check for the email localpart when signing up
This commit is contained in:
parent
18ae6a4a0f
commit
319965a4af
@ -76,7 +76,7 @@ class UserForm(flask_wtf.FlaskForm):
|
||||
|
||||
|
||||
class UserSignupForm(flask_wtf.FlaskForm):
|
||||
localpart = fields.StringField(_('Email address'))
|
||||
localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp("^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+$")])
|
||||
pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
|
||||
pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
|
||||
submit = fields.SubmitField(_('Sign up'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user