code/libraries/joomlatools/library/filter/iterator.php
public function validate($data)
    {
        $result = true;

        if(is_array($data) || $data instanceof Traversable)
        {
            foreach($data as $value)
            {
                if($this->validate($value) ===  false) {
                    $result = false;
                }
            }
        }
        else $result = $this->getDelegate()->validate($data);

        return $result;
    }
public function validate($data)
    {
        $result = true;

        if(is_array($data) || $data instanceof Traversable)
        {
            foreach($data as $value)
            {
                if($this->validate($value) ===  false) {
                    $result = false;
                }
            }
        }
        else $result = $this->getDelegate()->validate($data);

        return $result;
    }
public function validate ( $ data ) { $ result = true ; if ( is_array ( $ data ) || $ data instanceof Traversable ) { foreach ( $ data as $ value ) { if ( $ this -> validate ( $ value ) === false ) { $ result = false ; } } } else $ result = $ this -> getDelegate ( ) -> validate ( $ data ) ; return $ result ; }
Validate a scalar or traversable data

NOTE: This should always be a simple yes/no question (is $data valid?), so only true or false should be returned

@param   mixed   $data Value to be validated
@return  bool    True when the data is valid. False otherwise.
Validate a scalar or traversable data