public function validate() { $result = parent::validate(); if (!$this->Validated || $this->Validated < 1 || $this->Validated > 3) { $result->error('"Validated" field needs to be between 1 and 3'); } return $result; }