final public function validate($data)
    {
        if ($this->_walk && (is_array($data) || is_object($data))) {
            $arr = (array)$data;

            foreach ($arr as $value) {
                if ($this->validate($value) ===  false) {
                    return false;
                }
            }
        } else {
            $context = $this->_chain->getContext();
            $context->data = $data;

            $result = $this->_chain->run('validate', $context);

            if ($result ===  false) {
                return false;
            }
        }

        return true;
    }
final public function validate($data)
    {
        if ($this->_walk && (is_array($data) || is_object($data))) {
            $arr = (array)$data;

            foreach ($arr as $value) {
                if ($this->validate($value) ===  false) {
                    return false;
                }
            }
        } else {
            $context = $this->_chain->getContext();
            $context->data = $data;

            $result = $this->_chain->run('validate', $context);

            if ($result ===  false) {
                return false;
            }
        }

        return true;
    }
final public function validate ( $ data ) { if ( $ this -> _walk && ( is_array ( $ data ) || is_object ( $ data ) ) ) { $ arr = ( array ) $ data ; foreach ( $ arr as $ value ) { if ( $ this -> validate ( $ value ) === false ) { return false ; } } } else { $ context = $ this -> _chain -> getContext ( ) ; $ context -> data = $ data ; $ result = $ this -> _chain -> run ( 'validate' , $ context ) ; if ( $ result === false ) { return false ; } } return true ; }
Validate a variable or data collection

@param	mixed	Data to be validated
@return	bool	True when the data is valid
Validate a variable or data collection