Validate a phone number?
What are the condition to validate a phone number?
Well firstly it has to be a numerical value, can include the following numbers 0123456789 and the plus symbol. +
But what about the following conditions, where do you get this data?
-It has to be in the format [country dial code + area code + phone number]
-It has to be a min and max length
EDIT: also what is the min and max length of a mobile/cell phone number?
It's probably not worth trying to validate a phone number if the phone can be anywhere in the world.
- What about extensions?
- Numbers are different depending on where the call originates (inside/outside the country)
The places that I've seen that actually need to verify it (like craigslist) call the number and make you verify the information they give you over the phone.