There are so many combinations of European phone numbers, along with the 
possible combinations of area codes, and hyphens or spaces may be used as 
well, I wouldn't bother. If the phone number is critical, and important to 
the person using your site, then treatitlike a password and have them enter 
it twice. Although in that  case they are likely to enter it correctly anyway.

One can only do so much.

Miles Thompson

At 07:24 PM 6/19/01 -0700, Richard Kurth wrote:
>I am using this script to validate for phone numbers and it work just
>perfect for US phone numbers. But it rejects some European and
>Australian numbers what do I need to do to make it validate all phone
>numbers
>
>if (($WPHONE_NO) || ($wphone_no)) {
>    $wphone_no = trim($wphone_no);
>    if ($WPHONE_NO)
>       $phone_no = trim($WPHONE_NO);
>    if (!ereg("(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)", $wphone_no)) {
>       print_error("your <b>phone number</b> is invalid");
>    }
>}
>
>
>
>
>
>
>
>
>
>
>
>Best regards,
>  Richard
>mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to