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.

  1. What about extensions?
  2. 1-800-Flowers
  3. 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.

Need Your Help

Latex: Using Minted package - how do I make it wrap the text (linebreaks=true)

syntax latex pygments

Im using the Pygments for a lot of things, and I'd like to also use this in my latex report. I found the package Minted which interacts with Pygments, but some of the comments and some of the code

django-autocomplete-light links cannot target iframe

django iframe video-streaming django-autocomplete-light

Sorry up front if my terminology will be non-standard, but I am new to Django and Python...I am using Python 2.7.3 and Django 1.4.3 on a Mac OSX 10.7 (Lion). Django-autocomplete-light version 1.1.7...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.