Changeset 569 for branches/1.1dev
- Timestamp:
- Oct 29, 2016 2:56:51 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/FormValidator.inc.php
r568 r569 414 414 // Check domain exists: It's a domain if ip2long fails; checkdnsrr ensures a MX record exists; gethostbyname() ensures the domain exists. 415 415 $this->addError($form_name, sprintf(_("The email address <em>%s</em> does not have a valid domain name."), oTxt(getFormData($form_name))), MSG_ERR, __FILE__, __LINE__); 416 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)));416 logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val))); 417 417 return false; 418 418 } … … 435 435 $phone = getFormData($form_name); 436 436 437 $this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number <strong>%s</strong> is not valid."), $phone)); 438 $this->stringLength($form_name, 0, 25, sprintf(_("The phone number <strong>%s</strong> is too long"), $phone)); 437 if ($this->checkRegex($form_name, '/^[0-9 +().-]*$/', true, sprintf(_("The phone number <strong>%s</strong> is not valid."), $phone)) 438 && $this->stringLength($form_name, 0, 25, sprintf(_("The phone number <strong>%s</strong> is too long"), $phone))) { 439 return true; 440 } 441 return false; 439 442 } 440 443
Note: See TracChangeset
for help on using the changeset viewer.