From 2fd2f7b8135a5c86dcc5e2d625ae892de0ccffbb Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Thu, 11 Jun 2020 20:13:54 +0530 Subject: [PATCH] Remove added validation rule to prevent user from entering comma in option value --- CRM/Custom/Form/Field.php | 4 ---- tests/phpunit/CRM/Core/BAO/CustomValueTest.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Custom/Form/Field.php b/CRM/Custom/Form/Field.php index 042b711713..b7597bfe5f 100644 --- a/CRM/Custom/Form/Field.php +++ b/CRM/Custom/Form/Field.php @@ -748,10 +748,6 @@ SELECT count(*) $errors['option_value[' . $nextIndex . ']'] = ts('Duplicate Option values'); $_flagOption = 1; } - if (strpos($fields['option_value'][$start], ',') != FALSE) { - $errors['option_value[' . $start . ']'] = ts('You cannot use comma in Option value'); - $_flagOption = 1; - } $nextIndex++; } $start++; diff --git a/tests/phpunit/CRM/Core/BAO/CustomValueTest.php b/tests/phpunit/CRM/Core/BAO/CustomValueTest.php index fb88b59588..98e740ab80 100644 --- a/tests/phpunit/CRM/Core/BAO/CustomValueTest.php +++ b/tests/phpunit/CRM/Core/BAO/CustomValueTest.php @@ -100,7 +100,7 @@ class CRM_Core_BAO_CustomValueTest extends CiviUnitTestCase { public function testFixCustomFieldValue() { $customGroup = $this->customGroupCreate(['extends' => 'Individual']); $params = [ - 'email' => 'abc@webaccess.co.in', + 'email' => 'abc@example.com', ]; foreach ([ -- 2.25.1