protected function beforeValidate() { if (!$this->isAllowed()) { $this->addError('recipient_email', 'Recipient email is not in the list of allowed domains'); } return parent::beforeValidate(); }