Re: Phone number validation
| From: | Richard Baskett | Date: | Sun, 07 Apr 2002 19:27:13 +0000 |
| Subject: | Re: Phone number validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91946@lists.php.net to get a copy of this message | ||
I would agree with that. When I wrote that you COULD do that.. I didn¹t
mean that I do that :) If you wanted to get down and dirty and verify
everything about that phone number you could.. Was what I was trying to get
at. But when you had all the non-numeric characters in a phone number it
makes it hard to do any type of verification since everyone seems to write
their phone numbers different. Thus the reason for my advice on stripping
all non-numeric characters from the phone number before checking to make
sure it's a valid number or throwing it into your database in the format you
want. Verifying country, city, etc codes would just be a royal pain in the
@$$ and I wouldn¹t recommend it to anyone, there really is no reason to do
it, but you COULD do it if you really wanted :)
Cheers!
Rick
"Every person you meet - and everything you do in life - is an opportunity
to learn something." - Tom Clancy
> From: Miguel Cruz <mnc@stoic.net>
> Date: Sun, 7 Apr 2002 14:08:42 -0500 (CDT)
> To: Gordon Stewart <gordonisnz@yahoo.co.nz>
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Phone number validation
>
> On Mon, 8 Apr 2002, Gordon Stewart wrote:
>> Just as a curiosity - (I dont need / Want it now - Maybe later....)
>> Where / what site, can we get a list of the valid country/city codes ?
>
> Someone else has already provided you with a site.
>
> I'd just add that validating international numbers against any sort of
> list is bound to lead to extreme annoyance. Even telephone companies have
> trouble keeping track of changes.
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>