public function isValid()
    {
        if (!$this->validator) {
            $this->validate();
        }

        $isValid = !$this->validator->fails();

        $this->formHelper->alterValid($this, $this, $isValid);

        $this->eventDispatcher->dispatch(new AfterFormValidation($this, $this->validator, $isValid));

        return $isValid;
    }
public function isValid()
    {
        if (!$this->validator) {
            $this->validate();
        }

        $isValid = !$this->validator->fails();

        $this->formHelper->alterValid($this, $this, $isValid);

        $this->eventDispatcher->dispatch(new AfterFormValidation($this, $this->validator, $isValid));

        return $isValid;
    }
public function isValid ( ) { if ( ! $ this -> validator ) { $ this -> validate ( ) ; } $ isValid = ! $ this -> validator -> fails ( ) ; $ this -> formHelper -> alterValid ( $ this , $ this , $ isValid ) ; $ this -> eventDispatcher -> dispatch ( new AfterFormValidation ( $ this , $ this -> validator , $ isValid ) ) ; return $ isValid ; }
Check if the form is valid.

@return bool
Check if the form is valid .