Additional tests in EmailValidator.

This commit is contained in:
Suralc
2013-07-31 21:14:14 +02:00
parent 1c57661e1f
commit 1ce7344e18
2 changed files with 32 additions and 0 deletions

View File

@@ -64,7 +64,9 @@ class EmailValidator extends Validator
{
parent::init();
if ($this->enableIDN && !function_exists('idn_to_ascii')) {
// @codeCoverageIgnoreStart
throw new InvalidConfigException('In order to use IDN validation intl extension must be installed and enabled.');
// @codeCoverageIgnoreEnd
}
if ($this->message === null) {
$this->message = Yii::t('yii', '{attribute} is not a valid email address.');