From c971b6f8ebe82c66ea333e961a4aa5ad3047791f Mon Sep 17 00:00:00 2001 From: Marc Michalsky Date: Mon, 7 Aug 2023 16:46:57 +0200 Subject: [PATCH] let CRM_Twingle_Profile class handle its validation --- CRM/Twingle/Form/Profile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Twingle/Form/Profile.php b/CRM/Twingle/Form/Profile.php index 086dc2b..41d50be 100644 --- a/CRM/Twingle/Form/Profile.php +++ b/CRM/Twingle/Form/Profile.php @@ -566,6 +566,9 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form { CRM_Core_Session::setStatus($e->getMessage(), E::ts('Warning')); } } + catch (ProfileValidationError $e) { + $this->setElementError($e->getAffectedFieldName(), $e->getMessage()); + } } return parent::validate();