public function validate() { if (!$this->id) { $this->addError('Resource ID required'); } return parent::validate(); }