Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phone number validation regex

^(+d{1,2}s)?(?d{3})?[s.-]d{3}[s.-]d{4}$

Matches the following

123-456-7890
(123) 456-7890
123 456 7890
123.456.7890
+91 (123) 456-7890
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phone #number #validation #regex
ADD COMMENT
Topic
Name
9+7 =