Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrillberg committed Jan 2, 2025
1 parent ac89303 commit d2390d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/applications/simple-forms/form-upload/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ export const getMockData = (mockData, isLocalhost) => {
};

export const formattedPhoneNumber = phoneNumber => {
const phoneNumberWithoutDashes = phoneNumber.replaceAll('-', '');
return `(${phoneNumberWithoutDashes.substr(
0,
3,
)}) ${phoneNumberWithoutDashes.substr(
3,
3,
)}-${phoneNumberWithoutDashes.substr(6, 4)}`;
const digits = phoneNumber.replaceAll('-', '');
// Formats the phone number to look like this: (123) 456-7890
return digits.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"confirmationCode": "123456",
"formNumber": "21-0779",
"options": {
"ssn": "234232345",
"vaFileNumber": "456454567",
"zipCode": "12345"
"formData": {
"idNumber": {
"ssn": "234232345",
"vaFileNumber": "456454567"
},
"postalCode": "12345",
"fullName": "John Veteran",
"email": "[email protected]"
}
}

0 comments on commit d2390d0

Please sign in to comment.