Commit 239d48c3 by Alexander Makarov

Merge pull request #5427 from d0ct0r85/patch-1

[ci skip] Update input-validation.md
parents 03b88dd6 9c1750b2
...@@ -391,7 +391,7 @@ class CountryValidator extends Validator ...@@ -391,7 +391,7 @@ class CountryValidator extends Validator
public function validateAttribute($model, $attribute) public function validateAttribute($model, $attribute)
{ {
if (!in_array($model->$attribute, ['USA', 'Web'])) { if (!in_array($model->$attribute, ['USA', 'Web'])) {
$this->addError($attribute, 'The country must be either "USA" or "Web".'); $this->addError($model, $attribute, 'The country must be either "USA" or "Web".');
} }
} }
} }
......
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