src/FormHandler.php
public function isValid($scope = null, $options = null)
    {
        if (!$this->isSubmitted()) {
            return false;
        }

        // Check for internal errors & validator errors
        if ((isset($this->validator) && $this->validator->isValid($scope, $options) && empty($this->errors)) || (!isset($this->validator) && empty($this->errors))) {
            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setValid($this);
            }

            return true;
        }
        else {
            // There were errors, save them for the next request
            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setRestorableErrors($this, $this->getValidationErrors());
            }

            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setInvalid($this);
            }

            return false;
        }
    }
public function isValid($scope = null, $options = null)
    {
        if (!$this->isSubmitted()) {
            return false;
        }

        // Check for internal errors & validator errors
        if ((isset($this->validator) && $this->validator->isValid($scope, $options) && empty($this->errors)) || (!isset($this->validator) && empty($this->errors))) {
            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setValid($this);
            }

            return true;
        }
        else {
            // There were errors, save them for the next request
            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setRestorableErrors($this, $this->getValidationErrors());
            }

            if (isset($this->restoreDataHandler)) {
                $this->restoreDataHandler->setInvalid($this);
            }

            return false;
        }
    }
public function isValid ( $ scope = null , $ options = null ) { if ( ! $ this -> isSubmitted ( ) ) { return false ; } // Check for internal errors & validator errors if ( ( isset ( $ this -> validator ) && $ this -> validator -> isValid ( $ scope , $ options ) && empty ( $ this -> errors ) ) || ( ! isset ( $ this -> validator ) && empty ( $ this -> errors ) ) ) { if ( isset ( $ this -> restoreDataHandler ) ) { $ this -> restoreDataHandler -> setValid ( $ this ) ; } return true ; } else { // There were errors, save them for the next request if ( isset ( $ this -> restoreDataHandler ) ) { $ this -> restoreDataHandler -> setRestorableErrors ( $ this , $ this -> getValidationErrors ( ) ) ; } if ( isset ( $ this -> restoreDataHandler ) ) { $ this -> restoreDataHandler -> setInvalid ( $ this ) ; } return false ; } }
Check if the form is valid using the validator if it is set and checking for any
custom errors. Will save data to entities.

@param null $scope
@param null $options
@return bool
Check if the form is valid using the validator if it is set and checking for any custom errors . Will save data to entities .