public function clientValidateAttribute($model, $attribute, $view)
{
$options = ['pattern' => new JsExpression($this->pattern), 'fullPattern' => new JsExpression($this->fullPattern), 'allowName' => $this->allowName, 'message' => Yii::$app->getI18n()->format($this->message, ['attribute' => $model->getAttributeLabel($attribute)], Yii::$app->language), 'enableIDN' => (bool) $this->enableIDN];
if ($this->skipOnEmpty) {
$options['skipOnEmpty'] = 1;
}
ValidationAsset::register($view);
if ($this->enableIDN) {
PunycodeAsset::register($view);
}
return 'yii.validation.email(value, messages, ' . Json::htmlEncode($options) . ');';
}