html - How to validate phone number in javascript -
this question has answer here:
how can format script , input show 10 numbers , have characters of ( ) , + @ start of number? thanks.
you can use patern attribute like:
<input type="phone" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" required="">
Comments
Post a Comment