Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ['country', 'validateCountry']
- public function validateCountry($attribute, $params)
- {
- if (!in_array($this->$attribute, ['USA', 'Web'])) {
- $this->addError($attribute, 'The country must be either "USA" or "Web".');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement