Skip to content

Commit

Permalink
Merge 5f10c56 into 75e4c60
Browse files Browse the repository at this point in the history
  • Loading branch information
e-nikitin committed Jun 11, 2019
2 parents 75e4c60 + 5f10c56 commit 8eb053e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Rules/Delimited.php
Expand Up @@ -80,7 +80,10 @@ public function passes($attribute, $value)
$value = trim($value);
}

$items = collect(explode($this->separatedBy, $value))->filter();
$items = collect(explode($this->separatedBy, $value))
->filter(function ($item) {
return strlen((string)$item) > 0;
});

if (! is_null($this->minimum)) {
if ($items->count() < $this->minimum) {
Expand Down

0 comments on commit 8eb053e

Please sign in to comment.