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]

Reply via email to