Regex for accepting all types of phone numbers in JavaScript validation
1 answer
You can add three possibilities to the beginning of a regular expression.
This is the regex I once used for a similar requirement:
^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?\d{10}$
NOTE . You will have to remove all the hyphens as I don't think they are really necessary for validation.
The following is a description of a Regular Expression Regulator .
+2
source to share