Rohit Gautam

Rohit Gautam

  • NA
  • 24
  • 3.8k

Phone number validation in angular?

Oct 21 2021 6:37 AM

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)