Revize 2bd3da8a
Přidáno uživatelem Ondřej Fibich před téměř 6 roky(ů)
application/helpers/valid.php | ||
---|---|---|
return (bool) preg_match('/^(?!\.)[-+_a-z0-9.]++(?<!\.)@(?![-.])[-a-z0-9.]+(?<!\.)\.[a-z]{2,6}$/iD', $email);
|
||
}
|
||
|
||
/**
|
||
* Validate emails, commonly used characters only, separated by commas
|
||
*
|
||
* @param string email address
|
||
* @return boolean
|
||
*/
|
||
public static function emails($emails)
|
||
{
|
||
foreach (explode(',', $emails) as $email)
|
||
{
|
||
if (!self::email($email))
|
||
{
|
||
return FALSE;
|
||
}
|
||
}
|
||
return TRUE;
|
||
}
|
||
|
||
/**
|
||
* Validate email, RFC compliant version
|
||
* Note: This function is LESS strict than valid_email. Choose carefully.
|
Také k dispozici: Unified diff
Fixes #1096: Big debtor message + notification auto activation e-mail report [develop]