From 34236067aa01fa55e544aded14c2ab37eacefc12 Mon Sep 17 00:00:00 2001 From: "enrico.degaudenzi@connectorly.io" Date: Wed, 21 Feb 2024 10:55:50 +0000 Subject: [PATCH 1/2] #532 /user/registration/register now shows form validation errors if any --- src/User/Controller/RegistrationController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/User/Controller/RegistrationController.php b/src/User/Controller/RegistrationController.php index 0cfe1953..aa5f3b8a 100644 --- a/src/User/Controller/RegistrationController.php +++ b/src/User/Controller/RegistrationController.php @@ -144,6 +144,10 @@ public function actionRegister() ); } Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.')); + } else { + if (Yii::$app->request->isPost && $form->getErrorSummary(false)) { + Yii::$app->session->setFlash('danger', implode(', ', $form->getErrorSummary(false))); + } } return $this->render('register', ['model' => $form, 'module' => $this->module]); } From d0c9cd83d7fdd5102f60edba353a55b043c5cc6f Mon Sep 17 00:00:00 2001 From: "enrico.degaudenzi@connectorly.io" Date: Wed, 21 Feb 2024 11:02:07 +0000 Subject: [PATCH 2/2] #532 Added entry in changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65e1d172..454573dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Enh: Keycloak auth client (e.luhr) - Fix: Social Network Auth (eluhr) +- Enh #532: /user/registration/register now shows form validation errors ## 1.6.2 Jan 4th, 2024