Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

14 lines
446 B
PHP

<?php
class Validate extends ValidateCore
{
/**
* Check for e-mail validity
*
* @param string $email e-mail address to validate
* @return boolean Validity is ok or not
*/
public static function isEmail($email)
{
return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+(?:[.]?[_a-z\p{L}0-9-])*\.[a-z\p{L}0-9]{2,}$/ui'), $email);
}
}