Best answer by TomG
View originalI would like to create custom validation for us phone numbers
I would like to create custom validation so that respondents have to enter their phone number in the following fomat: (xxx)xxx-xxxx. I have tried using a custom validation with a regex statement, but it doesn't seem to work. Am I missing something? Thanks!
For sure! What Regex statement did you use? @TomG had a cool library that he uses in Javascript if you're able to use that. It's called Cleave.js. If not, we can get you the right Regex String!
If you want to go the custom validation route, here is a simple regex string (doesn't do any checking for valid area code or anything): `^\\([0-9]{3}\\)[0-9]{3}\\-[0-9]{4}$`
Leave a Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.