dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: telephone number validation

  1. #1
    Join Date
    Sep 2007
    Posts
    4

    telephone number validation

    Hello people

    Does anyone have any ideas how i would validate a telephone number using php to make sure that the user fills in correct digits etc.

    Stuart

  2. #2
    Join Date
    Jan 2007
    Posts
    187

  3. #3
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Just remember that different parts of the world have different numbers of digits for the country code (between 1 and 3) , area code (between 1 and 6), phone number (between 3 and 8) and extension (between 0 and 6).

    The lengths may vary more than that but I know of places where the lengths vary at least that much from the standard two digit country code, one digit area code and eight digit phone numbers that we use here.

  4. #4
    Join Date
    May 2003
    Location
    Andover, UK
    Posts
    410
    Also remember people can present their number in various styles. In the UK for example we could have 0044 1283 xxxxxx, 01283xxxxxx, +44(0)1283 xxx xxx all for the same number. I have some code I used to convert all to the same style, but that isn't the answer to your question. I don't think that there is one to cater for all countries.

  5. #5
    Join Date
    Jul 2007
    Posts
    357
    Last edited by ellisgl; 09-14-2007 at 02:22 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles