public function getErrors()
    {
        if (!$this->validator || !$this->validator instanceof Validator) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Form %s was not validated. To validate it, call "isValid" method before retrieving the errors',
                    get_class($this)
                )
            );
        }

        return $this->validator->getMessageBag()->getMessages();
    }
public function getErrors()
    {
        if (!$this->validator || !$this->validator instanceof Validator) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Form %s was not validated. To validate it, call "isValid" method before retrieving the errors',
                    get_class($this)
                )
            );
        }

        return $this->validator->getMessageBag()->getMessages();
    }
public function getErrors ( ) { if ( ! $ this -> validator || ! $ this -> validator instanceof Validator ) { throw new \ InvalidArgumentException ( sprintf ( 'Form %s was not validated. To validate it, call "isValid" method before retrieving the errors' , get_class ( $ this ) ) ) ; } return $ this -> validator -> getMessageBag ( ) -> getMessages ( ) ; }
Get validation errors.

@return array
Get validation errors .