Browse Source

Merge pull request #5427 from d0ct0r85/patch-1

[ci skip] Update input-validation.md
tags/2.0.0
Alexander Makarov 10 years ago
parent
commit
239d48c3df
  1. 2
      docs/guide/input-validation.md

2
docs/guide/input-validation.md

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

Loading…
Cancel
Save