109526520: render verify template with VerifyForm

This commit is contained in:
Rebecca Law
2015-12-04 16:21:01 +00:00
parent ab36653f24
commit 69da9f8f32
5 changed files with 33 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
from flask_wtf import Form
from wtforms import StringField, PasswordField
from wtforms import StringField, PasswordField, IntegerField
from wtforms.validators import DataRequired, Email, Length, Regexp
from app.main.validators import Blacklist
@@ -36,3 +36,8 @@ class RegisterUserForm(Form):
validators=[DataRequired(message='Please enter your password'),
Length(10, 255, message='Password must be at least 10 characters'),
Blacklist(message='That password is blacklisted, too common')])
class VerifyForm(Form):
sms_code = IntegerField(DataRequired(message='SMS code can not be empty'))
email_code = IntegerField(DataRequired(message='Email code can not be empty'))