mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
revert to regex for email validation
This commit is contained in:
parent
0edce2694b
commit
8eb5882520
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user