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

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -