php-general | 2001062
Date: 06/19/01
- Next message: Tim McGuire: "[PHP] List of included file names."
- Previous message: ??: "[PHP] Delete me in the mail group"
- Next in thread: Miles Thompson: "Re: [PHP] validate phone numbers"
- Reply: Miles Thompson: "Re: [PHP] validate phone numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:rkurth <email protected>
- Next message: Tim McGuire: "[PHP] List of included file names."
- Previous message: ??: "[PHP] Delete me in the mail group"
- Next in thread: Miles Thompson: "Re: [PHP] validate phone numbers"
- Reply: Miles Thompson: "Re: [PHP] validate phone numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

