Fixes #1870: Validation errors weren't properly translated when using clientside validation

This commit is contained in:
Alexander Makarov
2014-01-12 21:37:28 +04:00
parent 718ddfb99c
commit 4239b2a5f2
10 changed files with 39 additions and 38 deletions

View File

@@ -80,8 +80,8 @@ class RegularExpressionValidator extends Validator
$options = [
'pattern' => new JsExpression($pattern),
'not' => $this->not,
'message' => strtr($this->message, [
'{attribute}' => $object->getAttributeLabel($attribute),
'message' => Yii::t('yii', $this->message, [
'attribute' => $object->getAttributeLabel($attribute),
]),
];
if ($this->skipOnEmpty) {