From 714f72482767c6fcb515e741b160d32800d6b3ce Mon Sep 17 00:00:00 2001 From: Iris Abarquez Date: Fri, 8 Nov 2024 09:37:54 +1100 Subject: [PATCH] WPCIVIUX-176 Fix validator criteria and remove exception --- civicrm-ux.php | 2 +- includes/utils/class-civicrm-ux-validators.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/civicrm-ux.php b/civicrm-ux.php index b2b709d..ed55655 100644 --- a/civicrm-ux.php +++ b/civicrm-ux.php @@ -9,7 +9,7 @@ * Plugin Name: WP CiviCRM UX * Plugin URI: https://github.com/agileware/wp-civicrm-ux * Description: A better user experience for integrating WordPress and CiviCRM - * Version: 1.20.2 + * Version: 1.20.3 * Requires at least: 5.8 * Requires PHP: 7.4 * Requires Plugins: civicrm diff --git a/includes/utils/class-civicrm-ux-validators.php b/includes/utils/class-civicrm-ux-validators.php index 5824621..47589a7 100644 --- a/includes/utils/class-civicrm-ux-validators.php +++ b/includes/utils/class-civicrm-ux-validators.php @@ -46,10 +46,11 @@ public static function validateCssColor($color): ?string public static function validateAPIFieldName($field, $key = null): ?string { - $valid = preg_match('{ ^ (?! [.-] ) [[:alnum:]._-]+ (?