Changeset 141 for trunk/lib/FormValidator.inc.php
- Timestamp:
- Jun 3, 2006 11:09:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FormValidator.inc.php
r136 r141 410 410 // Test email address format. 411 411 if (!preg_match($e->getParam('regex'), $email, $e_parts)) { 412 $this->addError($form_name, sprintf(_(" <strong>%s</strong>is not a valid email address."), oTxt($email)));412 $this->addError($form_name, sprintf(_("%s is not a valid email address."), oTxt($email))); 413 413 $app->logMsg(sprintf('The email address %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__); 414 414 return false; … … 430 430 // Compare ip2long twice for php4 backwards compat. 431 431 if ((ip2long($domain) == '-1' || ip2long($domain) === false) && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) { 432 $this->addError($form_name, sprintf(_(" <strong>%s</strong>is not a valid email domain name"), oTxt($domain)));432 $this->addError($form_name, sprintf(_("%s is not a valid email domain name"), oTxt($domain))); 433 433 $app->logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__); 434 434 return false; … … 451 451 $phone = getFormData($form_name); 452 452 453 return $this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number <strong>%s</strong>is not valid."), $phone))454 && $this->stringLength($form_name, 0, 25, sprintf(_("The phone number <strong>%s</strong>is too long"), $phone));453 return $this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number %s is not valid."), $phone)) 454 && $this->stringLength($form_name, 0, 25, sprintf(_("The phone number %s is too long"), $phone)); 455 455 } 456 456
Note: See TracChangeset
for help on using the changeset viewer.