public function isValid()
    {
        foreach ($this->validators as $validator) {
            if (!$validator->isValid()) {
                // Prepare error messages
                foreach ($validator->getErrors() as $name => $messages) {
                    if (!isset($this->errors[$name])) {
                        $this->errors[$name] = array();
                    }

                    $this->errors[$name] = $messages;
                }
            }
        }

        return !$this->hasErrors();
    }
public function isValid()
    {
        foreach ($this->validators as $validator) {
            if (!$validator->isValid()) {
                // Prepare error messages
                foreach ($validator->getErrors() as $name => $messages) {
                    if (!isset($this->errors[$name])) {
                        $this->errors[$name] = array();
                    }

                    $this->errors[$name] = $messages;
                }
            }
        }

        return !$this->hasErrors();
    }
public function isValid ( ) { foreach ( $ this -> validators as $ validator ) { if ( ! $ validator -> isValid ( ) ) { // Prepare error messages foreach ( $ validator -> getErrors ( ) as $ name => $ messages ) { if ( ! isset ( $ this -> errors [ $ name ] ) ) { $ this -> errors [ $ name ] = array ( ) ; } $ this -> errors [ $ name ] = $ messages ; } } } return ! $ this -> hasErrors ( ) ; }
Runs the validation against all defined validators

@return boolean
Runs the validation against all defined validators