Commit 928df009 by Qiang Xue

fixed validation message translation [skip ci]

parent c811a883
......@@ -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),
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment