Hello,
I have to do phone number validation using JavaScript.
I have already done validation for numbers as follows,
var filter =/^[0-9]+$/
But now I have to also allow hyphen and "()".
Please provide me a way for the same.
Hello,
I have to do phone number validation using JavaScript.
I have already done validation for numbers as follows,
var filter =/^[0-9]+$/
But now I have to also allow hyphen and "()".
Please provide me a way for the same.
How about:
/^[0-9()-]+$/
Notes: