src/Controller/MelisCoreGdprController.php
private function getFormErrors($errors, $formConfig)
    {
        foreach ($errors as $errorKey => $errorValue) {
            foreach ($formConfig['elements'] as $elementKey => $elementValue) {
                if ($elementValue['spec']['name'] == $errorKey && !empty($elementValue['spec']['options']['label'])) {
                    $errors[$elementValue['spec']['options']['label']] = reset($errorValue);
                    unset($errors[$errorKey]);
                }
            }
        }

        return $errors;
    }
private function getFormErrors($errors, $formConfig)
    {
        foreach ($errors as $errorKey => $errorValue) {
            foreach ($formConfig['elements'] as $elementKey => $elementValue) {
                if ($elementValue['spec']['name'] == $errorKey && !empty($elementValue['spec']['options']['label'])) {
                    $errors[$elementValue['spec']['options']['label']] = reset($errorValue);
                    unset($errors[$errorKey]);
                }
            }
        }

        return $errors;
    }
private function getFormErrors ( $ errors , $ formConfig ) { foreach ( $ errors as $ errorKey => $ errorValue ) { foreach ( $ formConfig [ 'elements' ] as $ elementKey => $ elementValue ) { if ( $ elementValue [ 'spec' ] [ 'name' ] == $ errorKey && ! empty ( $ elementValue [ 'spec' ] [ 'options' ] [ 'label' ] ) ) { $ errors [ $ elementValue [ 'spec' ] [ 'options' ] [ 'label' ] ] = reset ( $ errorValue ) ; unset ( $ errors [ $ errorKey ] ) ; } } } return $ errors ; }
This will get the errors of the form
@param $errors
@param $formConfig
@return mixed
This will get the errors of the form