mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Add the new field to the application
This commit replaces the previous `StringField` used for collecting mobile phone numbers with the `UKMobileNumber` field. This means changing a few of the preexisting tests to have more realistic mobile numbers so that they still pass.
This commit is contained in:
@@ -65,10 +65,8 @@ class UKMobileNumber(StringField):
|
||||
|
||||
|
||||
def mobile_number():
|
||||
mobile_number_regex = "^\\+44[\\d]{10}$"
|
||||
return StringField('Mobile phone number',
|
||||
validators=[DataRequired(message='Mobile number can not be empty'),
|
||||
Regexp(regex=mobile_number_regex, message='Enter a +44 mobile number')])
|
||||
return UKMobileNumber('Mobile phone number',
|
||||
validators=[DataRequired(message='Cannot be empty')])
|
||||
|
||||
|
||||
def password():
|
||||
|
||||
Reference in New Issue
Block a user