From 6792e35b78eb23102b134b49a388d2aad23b627f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 18 Aug 2021 10:44:19 +1200 Subject: [PATCH] dev/core#2769 use php email validation not hacked qf Per https://lab.civicrm.org/dev/core/-/issues/2769 we have had problems over the years with quickform's email validation and we now have a hacked version that is problematic from a maintenance pov & also doesn't work with the string I have just encountered: name.-o-.i.10@example.com (which I am told is valid and which passes the php filter). We already have an email rule which calls a php native function which is better maintained than our layers of hacks. This PR registers our email rule - which overrides the quickform one. If we merge this we can revert quickform back to unhacked which will improve debugging and maintenance (although it's actually bypassed now with this change) --- CRM/Core/Form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 0f07bdd1496c..5478f87252a0 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -347,6 +347,7 @@ public function registerRules() { 'settingPath', 'autocomplete', 'validContact', + 'email', ]; foreach ($rules as $rule) {