I need a Javascript RegEx through which I can validate phone number. RegEx should handle following criteria
Thanks for the help!
Hussain.
Try this:
function valid_phone_number(ph) { var regex = /^(?!([^-]*-){5})(+d+)?s*((d+))?[- d]+$/gi; return regex.test(ph); }
I'm new to regular expressions, so please be nice. :-)
1.4m articles
1.4m replys
5 comments
57.0k users