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

Sachin SinghPosted Oct 21, 2021, 7:32 AM
Rohit GautamPosted Oct 22, 2021, 5:52 AM
Srinivasan RamamoorthiPosted Oct 21, 2021, 6:43 AM
Try this one
^(\\[7-9]{2})[0-9]{10}$