Closed danielavelez1201 closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/host-a-refugee/host-a-refugee/9FdNsikzzP97uNVpjoGbJyYCQN1P
✅ Preview: https://host-a-refugee-git-feature-phone-num-validation-host-a-refugee.vercel.app
Phone number validation using regex.
Has to start with a 1-4 digit number: ^+?(?([0-9]{1,4}))? Optionally has a 2 digit number after: ([-. ]?([0-9]{2}))? Has to have a 3 digit number: ([-. ]?([0-9]{3})) Has to have a 2-3 digit number: ([-. ]?([0-9]{2,3})) Has to have a 2-4 digit number: ([-. ]?([0-9]{2,4}))$
Regex tests and explanation: regexr.com/6gg6i
Source for common phone number sequences: https://en.wikipedia.org/wiki/Telephone_numbers_in_Ukraine