Merge pull request #5427 from d0ct0r85/patch-1

[ci skip] Update input-validation.md
This commit is contained in:
Alexander Makarov
2014-10-08 14:44:19 +04:00

View File

@@ -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".');
}
}
}