I want to validate phone numbers like (123) 456-7890 or 1234567890 How should be the \'matches\' condition be written in the following code?
form.validate({
I tried the below solution and it work fine for me.
/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/
Tried below phone format: