validate() public method

Base validator of resource from schema definition.
public validate ( ) : boolean
return boolean
Esempio n. 1
0
 /**
  * As a primary resource (i.e. mapped to external resource) we need to ensure we have an id for tracking
  * the resource in the system.
  *
  * @return bool
  */
 public function validate()
 {
     if (!$this->id) {
         $this->addError('Resource ID required');
     }
     return parent::validate();
 }