I want to check entered phone number is valid E164 formate phone number if not then convert in proper E164 formate
Asked
Active
Viewed 1,604 times
1
-
We have try following link code https://stackoverflow.com/questions/4708248/formatting-phone-numbers-in-php – Sonali Hajarnis Jun 22 '17 at 13:05
1 Answers
0
Use Regular Expressions in PHP.
The regex I had to come up with that works along with '+' sign along with the digits which much reside between 10~15 is as follows:
^\++?[0-9]\d{6,14}$
And this works well. You can check it out on Regex101.
Shayan Ahmad
- 815
- 8
- 15