From ee96b6485fe0d6cf4e1eef72e37d91cd3d02e32b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 9 Jun 2023 19:10:43 +1200 Subject: [PATCH] Fix back office register form validation Follow on to https://github.com/civicrm/civicrm-core/pull/26346#event-9346416078 --- CRM/Event/Form/Participant.php | 2 +- CRM/Event/Form/Task/Register.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 0fcd0c4348..5ab8781600 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -776,7 +776,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment * @return void */ public function addRules(): void { - $this->addFormRule(['CRM_Event_Form_Participant', 'formRule']); + $this->addFormRule(['CRM_Event_Form_Participant', 'formRule'], $this); } /** diff --git a/CRM/Event/Form/Task/Register.php b/CRM/Event/Form/Task/Register.php index 9102e660b1..e59d4ee65f 100644 --- a/CRM/Event/Form/Task/Register.php +++ b/CRM/Event/Form/Task/Register.php @@ -148,7 +148,7 @@ class CRM_Event_Form_Task_Register extends CRM_Event_Form_Participant { * @return void */ public function addRules(): void { - $this->addFormRule(['CRM_Event_Form_Task_Register', 'formRule']); + $this->addFormRule(['CRM_Event_Form_Task_Register', 'formRule'], $this); } /** -- 2.25.1