PHP Класс yii\validators\EmailValidator

С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends Validator
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$allowName whether to allow name in the email address (e.g. "John Smith "). Defaults to false.
$checkDNS whether to check whether the email's domain exists and has either an A or MX record. Be aware that this check can fail due to temporary DNS problems even if the email address is valid and an email would be deliverable. Defaults to false.
$enableIDN whether validation process should take into account IDN (internationalized domain names). Defaults to false meaning that validation of emails containing IDN will always fail. Note that in order to use IDN validation you have to install and enable intl PHP extension, otherwise an exception would be thrown.
$fullPattern the regular expression used to validate email addresses with the name part. This property is used only when [[allowName]] is true.
$pattern the regular expression used to validate the attribute value.

Открытые методы

Метод Описание
clientValidateAttribute ( $model, $attribute, $view )
init ( )

Защищенные методы

Метод Описание
validateValue ( $value )

Описание методов

clientValidateAttribute() публичный Метод

public clientValidateAttribute ( $model, $attribute, $view )

init() публичный Метод

public init ( )

validateValue() защищенный Метод

protected validateValue ( $value )

Описание свойств

$allowName публичное свойство

whether to allow name in the email address (e.g. "John Smith "). Defaults to false.
См. также: fullPattern
public $allowName

$checkDNS публичное свойство

whether to check whether the email's domain exists and has either an A or MX record. Be aware that this check can fail due to temporary DNS problems even if the email address is valid and an email would be deliverable. Defaults to false.
public $checkDNS

$enableIDN публичное свойство

whether validation process should take into account IDN (internationalized domain names). Defaults to false meaning that validation of emails containing IDN will always fail. Note that in order to use IDN validation you have to install and enable intl PHP extension, otherwise an exception would be thrown.
public $enableIDN

$fullPattern публичное свойство

the regular expression used to validate email addresses with the name part. This property is used only when [[allowName]] is true.
См. также: allowName
public $fullPattern

$pattern публичное свойство

the regular expression used to validate the attribute value.
См. также: http://www.regular-expressions.info/email.html
public $pattern