Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32058

validation for phone number in javascript

$
0
0
i need validation for phone number to accept only 12 digits and it should accept spaces and phonenumber should not start with digit 1
 

here is the validation i tried but here its not at all accepting 1 digit .in my case 1 should not start from first that's it.how to do?
 

var phonepat=/^[\s()+-]*([02-9][\s()+-]*){7,12}$/;

Viewing all articles
Browse latest Browse all 32058

Trending Articles