Commit 9c1750b2 by Vadim

Update input-validation.md

parent 1b6431f4
......@@ -391,7 +391,7 @@ class CountryValidator extends Validator
public function validateAttribute($model, $attribute)
{
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