0

How do I code HTML table form to format the phone number field with a dash or space? Example: 000-000-0000 So that user can just enter string of numbers.

Will Noel
  • 69
  • 1
  • 9

2 Answers2

0

You could try this library that let's you define the pattern you need and formats it

http://firstopinion.github.io/formatter.js/

Agu V
  • 2,091
  • 4
  • 25
  • 40
0

You should use regular expressions validation. In here you can find regex patterns for different phone patterns.

Community
  • 1
  • 1