From e73a8f6f9620daaa307ab8b7aea5f44664f52302 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Sun, 3 Jul 2022 23:09:04 +0200 Subject: [PATCH] Fixes rakit/validation#139 --- src/Validation.php | 3 ++- tests/ValidationTest.php | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Validation.php b/src/Validation.php index 3080127..163e7b5 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -529,7 +529,8 @@ protected function parseRule(string $rule): array $exp = explode(':', $rule, 2); $rulename = $exp[0]; if ($rulename !== 'regex') { - $params = isset($exp[1])? explode(',', $exp[1]) : []; + $params = isset($exp[1]) ? + str_replace("\,", ",", preg_split('~(?