src/FormHandler.php
public function addCustomErrors($errors)
    {
        if ($errors) {
            foreach ($errors as $error) {
                if (!is_a($error, 'AV\Form\FormError')) {
                    throw new InvalidArgumentException('Custom errors must be AV\Form\FormError objects');
                }
                else {
                    $this->errors[] = $error;
                }
            }
        }

        // Call isValid to update valid status in restore data handlers
        $this->isValid();
    }
public function addCustomErrors($errors)
    {
        if ($errors) {
            foreach ($errors as $error) {
                if (!is_a($error, 'AV\Form\FormError')) {
                    throw new InvalidArgumentException('Custom errors must be AV\Form\FormError objects');
                }
                else {
                    $this->errors[] = $error;
                }
            }
        }

        // Call isValid to update valid status in restore data handlers
        $this->isValid();
    }
public function addCustomErrors ( $ errors ) { if ( $ errors ) { foreach ( $ errors as $ error ) { if ( ! is_a ( $ error , 'AV\Form\FormError' ) ) { throw new InvalidArgumentException ( 'Custom errors must be AV\Form\FormError objects' ) ; } else { $ this -> errors [ ] = $ error ; } } } // Call isValid to update valid status in restore data handlers $ this -> isValid ( ) ; }
Add custom errors to the form. Must be an array of FormError objects

@param $errors FormError[]
@throws InvalidArgumentException
Add custom errors to the form . Must be an array of FormError objects