3
Answers

Phone number validation in angular?

Rohit Gautam

Rohit Gautam

3y
787
1

Hi, everyone,

I am using phone number validation using a pattern.

Validators.pattern("^((\\+91-?)|0)?[0-9]{10}$")  // this is what i found everywhere.

 

I want to restrict the first 2 digits of the number to 7 to 9 only. User should be able to add only 7,8,9 only.

for example 433333333333 to 973333333333

Please help 

 

Answers (3)