I need a PHP RegEx through which I can validate a phone number format using the following criteria:
- Should not include anything except for numbers;
- Should not start with a zero as I need to have the country code prefixed;
- The list of allowed country codes should be there in RegEx;
- The digit immediately after the country code should not be a zero;
- The maximum length of the number should not exceed 13 digits.
I have tried to search on Stack Overflow before posting this question but couldn't find the exact solution. Any help would be highly appreciated.
Edit: I just want the user to enter the phone number in a valid format as currently my clients do some silly formatting mistakes while writing it. I am not worried about it being actually valid (call-able) as the user will take care of that himself.
Regards