Skip to content

Commit

Permalink
Merge pull request #80 from jinjie/patch-2
Browse files Browse the repository at this point in the history
Improving Constraint_check
  • Loading branch information
lekoala committed Apr 15, 2022
2 parents ef427b9 + ba58c8b commit 24ef365
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/ZenValidatorConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,12 @@ public function removeParsley()

public function validate($value)
{
$array = array_filter(explode(',', $value));
if (is_string($value)) {
$array = array_filter(explode(',', $value));
} else {
$array = $value;
}

if (empty($array)) {
return; //you should use required instead
}
Expand Down

0 comments on commit 24ef365

Please sign in to comment.