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 SinghRank #66 · 26.2K reputationPosted Oct 21, 2021, 3:32 AM EDT
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Oct 21, 2021, 2:43 AM EDT
Try this one
^(\\[7-9]{2})[0-9]{10}$
Rohit Gautam26 reputationPosted Oct 22, 2021, 1:52 AM EDT