Skip to content

Commit

Permalink
MBMS-40990 Updated phone number schema to improve validation (#782)
Browse files Browse the repository at this point in the history
Co-authored-by: Connor <[email protected]>
  • Loading branch information
ConnorJeff and Connor authored Jul 6, 2023
1 parent 526c3c4 commit 4eb0ab8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/40-10007-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
"type": "string",
"minLength": 10,
"maxLength": 20,
"pattern": "^[0-9]{10,15}$"
"pattern": "^(?:\\D*\\d){10,15}\\D*$"
},
"ssn": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vets-json-schema",
"version": "20.26.12",
"version": "20.26.13",
"repository": {
"type": "git",
"url": "git+https://github.com/department-of-veterans-affairs/vets-json-schema.git"
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/40-10007/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ definitions.fullName.properties.suffix.maxLength = 3;

definitions.phone.minLength = 10;
definitions.phone.maxLength = 20;
definitions.phone.pattern = '^[0-9]{10,15}$';
definitions.phone.pattern = '^(?:\\D*\\d){10,15}\\D*$';

definitions.ssn.pattern = '^\\d{3}-\\d{2}-\\d{4}$';

Expand Down

0 comments on commit 4eb0ab8

Please sign in to comment.