public function getValidationErrors()
    {
        $fields = $this->getFields();
        if (!$fields) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            if ($field instanceof AbstractFormField) {
                if (!$field->isValid()) {
                    $result = array_merge($result, $field->getErrorMessages());
                }
            }
        }

        return $result;
    }
public function getValidationErrors()
    {
        $fields = $this->getFields();
        if (!$fields) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            if ($field instanceof AbstractFormField) {
                if (!$field->isValid()) {
                    $result = array_merge($result, $field->getErrorMessages());
                }
            }
        }

        return $result;
    }
public function getValidationErrors ( ) { $ fields = $ this -> getFields ( ) ; if ( ! $ fields ) { return [ ] ; } $ result = [ ] ; foreach ( $ fields as $ field ) { if ( $ field instanceof AbstractFormField ) { if ( ! $ field -> isValid ( ) ) { $ result = array_merge ( $ result , $ field -> getErrorMessages ( ) ) ; } } } return $ result ; }
Get an array with all validation errors
@return array
Get an array with all validation errors