mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 14:57:23 +08:00
refactored exceptions.
I18N WIP.
This commit is contained in:
@@ -49,7 +49,7 @@ class CaptchaValidator extends Validator
|
||||
}
|
||||
$captcha = $this->getCaptchaAction();
|
||||
if (!$captcha->validate($value, $this->caseSensitive)) {
|
||||
$message = $this->message !== null ? $this->message : \Yii::t('yii', 'The verification code is incorrect.');
|
||||
$message = $this->message !== null ? $this->message : \Yii::t('yii:The verification code is incorrect.');
|
||||
$this->addError($object, $attribute, $message);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class CaptchaValidator extends Validator
|
||||
public function clientValidateAttribute($object, $attribute)
|
||||
{
|
||||
$captcha = $this->getCaptchaAction();
|
||||
$message = $this->message !== null ? $this->message : \Yii::t('yii', 'The verification code is incorrect.');
|
||||
$message = $this->message !== null ? $this->message : \Yii::t('yii:The verification code is incorrect.');
|
||||
$message = strtr($message, array(
|
||||
'{attribute}' => $object->getAttributeLabel($attribute),
|
||||
'{value}' => $object->$attribute,
|
||||
|
||||
Reference in New Issue
Block a user