Changeset 305
- Timestamp:
- Jan 29, 2008 8:54:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FormValidator.inc.php
r282 r305 433 433 434 434 if ('' == trim($email)) { 435 // No email address provided, and that's okay 435 // No email address provided, and that's okay. 436 436 return true; 437 437 } … … 441 441 case VALIDATE_EMAIL_REGEX_FAIL: 442 442 // Failed regex match. 443 $this->addError($form_name, sprintf(_(" <em>%s</em> is not a valid email address."), oTxt($email)));444 $app->logMsg(sprintf('The email address %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);443 $this->addError($form_name, sprintf(_("The email address <em>%s</em> is formatted incorrectly."), oTxt($email))); 444 $app->logMsg(sprintf('The email address %s is not valid.', oTxt($email)), LOG_DEBUG, __FILE__, __LINE__); 445 445 return false; 446 446 break; 447 447 448 case VALIDATE_EMAIL_LENGTH_FAIL : 448 449 // Failed length requirements. 449 $this->addError($form_name, sprintf(_(" <em>Email address</em> must contain less than 256 characters."), oTxt($email)));450 $app->logMsg(sprintf('The email address %s must contain less than 256 characters.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);450 $this->addError($form_name, sprintf(_("The email address <em>%s</em> is too long (email addresses must have fewer than 256 characters)."), oTxt($email))); 451 $app->logMsg(sprintf('The email address %s must contain less than 256 characters.', oTxt($email)), LOG_DEBUG, __FILE__, __LINE__); 451 452 return false; 452 453 break; 454 453 455 case VALIDATE_EMAIL_MX_FAIL : 454 456 // Failed MX record test. 455 $this->addError($form_name, sprintf(_(" <em>%s</em> is not a valid email domain name"), oTxt($domain)));456 $app->logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__);457 $this->addError($form_name, sprintf(_("The email address <em>%s</em> does not have a valid domain name"), oTxt($email)); 458 $app->logMsg(sprintf('The email address %s does not have a valid domain name.', oTxt($email)), LOG_INFO, __FILE__, __LINE__); 457 459 return false; 458 460 break; 461 459 462 case VALIDATE_EMAIL_SUCCESS : 460 463 default :
Note: See TracChangeset
for help on using the changeset viewer.