diff --git a/app/main/forms.py b/app/main/forms.py index aec0fe2d2..188b5b8df 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -62,7 +62,7 @@ def password(label='Create a password'): def sms_code(): verify_code = '^\d{5}$' - return StringField('Text message confirmation code', + return StringField('Text message code', validators=[DataRequired(message='Text message confirmation code can not be empty'), Regexp(regex=verify_code, message='Text message confirmation code must be 5 digits')]) @@ -70,7 +70,7 @@ def sms_code(): def email_code(): verify_code = '^\d{5}$' - return StringField("Email confirmation code", + return StringField("Email code", validators=[DataRequired(message='Email confirmation code can not be empty'), Regexp(regex=verify_code, message='Email confirmation code must be 5 digits')]) diff --git a/app/templates/views/verify.html b/app/templates/views/verify.html index 7d6819779..292c777f5 100644 --- a/app/templates/views/verify.html +++ b/app/templates/views/verify.html @@ -10,10 +10,10 @@ GOV.UK Notify | Confirm email address and mobile number
We’ve sent you confirmation codes by email and text message. You need to enter both codes here.
- ++ We’ve sent you confirmation codes by email and text message. +
diff --git a/tests/app/main/views/test_verify.py b/tests/app/main/views/test_verify.py index 48240e307..4b5d790da 100644 --- a/tests/app/main/views/test_verify.py +++ b/tests/app/main/views/test_verify.py @@ -18,7 +18,7 @@ def test_should_return_verify_template(app_, assert response.status_code == 200 assert ( "We’ve sent you confirmation codes by email and text message." - " You need to enter both codes here.") in response.get_data(as_text=True) + ) in response.get_data(as_text=True) def test_should_redirect_to_add_service_when_code_are_correct(app_,