revert to regex for email validation

This commit is contained in:
Uwe Steinmann 2021-06-29 10:20:31 +02:00
parent 0edce2694b
commit 8eb5882520

View File

@ -1233,8 +1233,8 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
break;
case self::type_email:
foreach($values as $value) {
$success &= filter_var($value, FILTER_VALIDATE_EMAIL);
//preg_match('/^[a-z0-9._-]+@+[a-z0-9._-]+\.+[a-z]{2,63}$/i', $value);
//$success &= filter_var($value, FILTER_VALIDATE_EMAIL) ? true : false;
$success &= preg_match('/^[a-z0-9._-]+@+[a-z0-9._-]+\.+[a-z]{2,63}$/i', $value);
}
if(!$success)
$this->_validation_error = 5;