/** * Custom validation. * * @throws \coding_exception * @return void */ protected function validate_data() { parent::validate_data(); if (!isset($this->other['discussionid'])) { throw new \coding_exception('The \'discussionid\' value must be set in other.'); } else { if (!isset($this->other['triggeredfrom'])) { throw new \coding_exception('The \'triggeredfrom\' value must be set in other.'); } } }
/** * Custom validation * * @throws \coding_exception * @return void */ protected function validate_data() { parent::validate_data(); if (!isset($this->other['triggeredfrom'])) { throw new \coding_exception('triggeredfrom must be set in $other'); } }