From 94f86078b1737e85991f3bb9e00a4a53e3be0e2f Mon Sep 17 00:00:00 2001 From: Amir Date: Fri, 22 Oct 2021 12:02:23 +0330 Subject: [PATCH] bugfix Validation/Rules.php --- src/Validation/Rules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Validation/Rules.php b/src/Validation/Rules.php index 4ff1d8e..6d7c662 100644 --- a/src/Validation/Rules.php +++ b/src/Validation/Rules.php @@ -278,13 +278,13 @@ protected function in(array $parameters): void $array = explode(',' , $parameters['value']); if (str_contains($parameters['rule'] , '*') && $data) { foreach ($data as $index => $item){ - if ($item && !in_array($item , $array)){ + if ($item && !in_array($item , $array , true)){ $this->saveError($parameters , $index); } } return; } - if ($data && !in_array($data , $array)){ + if ($data && !in_array($data , $array , true)){ $this->saveError($parameters); } }