Skip to content
Snippets Groups Projects
Verified Commit d608a891 authored by ornanovitch's avatar ornanovitch
Browse files

fix(account username): update regex validator

parent 707fc419
No related branches found
No related tags found
1 merge request!62Resolve "username : validation regex insuffisante"
Pipeline #26313 passed
......@@ -19,8 +19,8 @@ class TotpForm(flask_wtf.FlaskForm):
class SignupForm(flask_wtf.FlaskForm):
username = fields.StringField(_('Username'), [
validators.DataRequired(),
validators.Regexp("[a-z0-9-_]", message="Your username must be \
comprised of lowercase letters and numbers only")
validators.Regexp("(^[a-z0-9-_]+$)", message=(_("Your username must be \
comprised of lowercase letters, numbers and '-' '_' only")))
])
password = fields.PasswordField(_('Password'), [validators.DataRequired()])
password2 = fields.PasswordField(_('Confirm password'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment