Skip to content

Commit

Permalink
bugfix Validation/Rules.php
Browse files Browse the repository at this point in the history
  • Loading branch information
amirfaramarzi committed Oct 22, 2021
1 parent 550a88d commit 94f8607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 94f8607

Please sign in to comment.