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;
    }