mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
109526520: Changed the code form fields to StringField
When the codes were IntegerFields and the code started with zero, the zero was trimmed, resulting in a failed match.
This commit is contained in:
@@ -41,10 +41,12 @@ class RegisterUserForm(Form):
|
||||
|
||||
|
||||
class VerifyForm(Form):
|
||||
sms_code = IntegerField("Text message confirmation code",
|
||||
validators=[DataRequired(message='SMS code can not be empty')])
|
||||
email_code = IntegerField("Email confirmation code",
|
||||
validators=[DataRequired(message='Email code can not be empty')])
|
||||
sms_code = StringField("Text message confirmation code",
|
||||
validators=[DataRequired(message='SMS code can not be empty'),
|
||||
Length(min=5, max=5, message='Code must be 5 digits')])
|
||||
email_code = StringField("Email confirmation code",
|
||||
validators=[DataRequired(message='Email code can not be empty'),
|
||||
Length(min=5, max=5, message='Code must be 5 digits')])
|
||||
|
||||
def validate_email_code(self, a):
|
||||
if self.email_code.data is not None:
|
||||
|
||||
Reference in New Issue
Block a user