Updated error message is the code is not the right size or data type.

Updated two_factor to error is the user account is locked (locked = over 10 failed_login_count)
This commit is contained in:
Rebecca Law
2017-02-15 14:56:22 +00:00
parent 25227d89bd
commit cf3a933b1e
5 changed files with 26 additions and 18 deletions

View File

@@ -118,14 +118,7 @@ def sms_code():
return StringField('Text message code',
validators=[DataRequired(message='Cant be empty'),
Regexp(regex=verify_code,
message='Must be 5 digits')])
def email_code():
verify_code = '^\d{5}$'
return StringField("Email code",
validators=[DataRequired(message='Cant be empty'),
Regexp(regex=verify_code, message='Must be 5 digits')])
message='Code not found')])
class LoginForm(Form):