src/xPDO/Om/xPDOObject.php
public function validate(array $options = array()) {
        $validated= false;
        if ($validator= $this->getValidator()) {
            $validated= $this->_validator->validate($options);
            if ($this->xpdo->getDebug() === true) {
                $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Validator class executed, result = " . print_r($validated, true));
            }
        } else {
            if ($this->xpdo->getDebug() === true) {
                $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "No validator found for {$this->_class} instance.");
            }
            $validated= true;
        }
        return $validated;
    }
public function validate(array $options = array()) {
        $validated= false;
        if ($validator= $this->getValidator()) {
            $validated= $this->_validator->validate($options);
            if ($this->xpdo->getDebug() === true) {
                $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Validator class executed, result = " . print_r($validated, true));
            }
        } else {
            if ($this->xpdo->getDebug() === true) {
                $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "No validator found for {$this->_class} instance.");
            }
            $validated= true;
        }
        return $validated;
    }
public function validate ( array $ options = array ( ) ) { $ validated = false ; if ( $ validator = $ this -> getValidator ( ) ) { $ validated = $ this -> _validator -> validate ( $ options ) ; if ( $ this -> xpdo -> getDebug ( ) === true ) { $ this -> xpdo -> log ( xPDO :: LOG_LEVEL_DEBUG , "Validator class executed, result = " . print_r ( $ validated , true ) ) ; } } else { if ( $ this -> xpdo -> getDebug ( ) === true ) { $ this -> xpdo -> log ( xPDO :: LOG_LEVEL_DEBUG , "No validator found for {$this->_class} instance." ) ; } $ validated = true ; } return $ validated ; }
Validate the field values using an xPDOValidator.

@param array $options An array of options to pass to the validator.
@return boolean True if validation was successful.
Validate the field values using an xPDOValidator .