Skip to content
Snippets Groups Projects
Commit 0c209225 authored by Michael Drury's avatar Michael Drury
Browse files

fixed error with email regex which didnt require a .

parent 2bf209da
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ class SignupForm(FlaskForm):
username = StringField('Username', validators=[input_required(), Length(1, 12)])
password = PasswordField('Password', validators=[input_required()])
verifyPassword = PasswordField('Verify password', validators=[input_required(), EqualTo('password', message='Passwords must match')])
email = StringField('email', validators=[Regexp(regex="^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$", message = 'has to be a valid email'), input_required()])
email = StringField('email', validators=[Regexp(regex="[^@]+@[^@]+.[^@]+", message = 'has to be a valid email'), input_required()])
mobile = StringField('mobile', validators=[Regexp(regex='^[+-]?[0-9]+$', message = 'only integers allowed'), input_required(), Length(11, 11)])
submit = SubmitField('Submit')
......@@ -52,7 +52,7 @@ class reviewForm(FlaskForm):
submit1 = SubmitField('Submit')
class emailChangeForm(FlaskForm):
new_email = StringField('Enter a new email:', validators=[Regexp(regex="^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$", message = 'has to be a valid email'), input_required()])
new_email = StringField('Enter a new email:', validators=[Regexp(regex="[^@]+@[^@]+.[^@]+", message = 'has to be a valid email'), input_required()])
submit1 = SubmitField('Submit')
class mobileChangeForm(FlaskForm):
......
......@@ -34,6 +34,7 @@
</p>
<p class="login_field">
{{ mobile_form.new_mobile.label }} {{ mobile_form.new_mobile(class = "input_field") }} {{ mobile_form.submit2(class = "input_field") }}
</p>
</div>
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment