mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
fixed validation message translation [skip ci]
This commit is contained in:
@ -93,7 +93,7 @@ class CaptchaValidator extends Validator
|
||||
'hashKey' => 'yiiCaptcha/' . $this->captchaAction,
|
||||
'caseSensitive' => $this->caseSensitive,
|
||||
'message' => strtr($this->message, [
|
||||
'{attribute}' => $object->getAttributeLabel($attribute),
|
||||
'attribute' => $object->getAttributeLabel($attribute),
|
||||
]),
|
||||
];
|
||||
if ($this->skipOnEmpty) {
|
||||
|
@ -151,7 +151,7 @@ class StringValidator extends Validator
|
||||
|
||||
$options = [
|
||||
'message' => Yii::$app->getI18n()->format($this->message, [
|
||||
'{attribute}' => $label,
|
||||
'attribute' => $label,
|
||||
], Yii::$app->language),
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user