-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update validation code for non_emergency contact numbers to accept no…
…n_emergency 3 digit numbers and numbers with extentions The python port of libphonenumber is much stricter than our old bespoke validation code. As a result it does not accept phone numbers with extensions or phone numbers with 3 digits. This change incorporates the changes to utils that throw an appropriate error, and adds a crude method for handling numbers with extensions. The form will accept any number that returns a TOO_LONG error code, assuming it must be because of an extension (this shouldn't matter as we are not validating whether the phone number is real for notify to send sms notifications to. The service owner will be confident that they're providing the correct number for their service)
- Loading branch information
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters