Regular expression for phone number

Posted by Manimaddu under ASP.NET on 8/11/2014 | Points: 10 | Views : 415 | Status : [Member] | Replies : 2
Hi All...

I need regular Expression it satisfies the below conditions.

1.Number format must be 123-456-7890
2.When 3 numbers are pressed the hyphen symbol added automatically.
3.It allows only 10 digits.
4.When i clear the number total number must be deleted(includes hyphen).

Thanks in advance.

Thanks & Regards,
Mani Kumar


Posted by: kgovindarao523-21772 on: 8/12/2014 [Member] [MVP] Bronze | Points: 25

you can achieve this using jquery input mask.
use below cdn path along with jquery plugin.
then apply mask like below.


Thank you,

Manimaddu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response