Skip to content

Commit

Permalink
fix: adding a validator description to the arraylist only if it has v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
byawitz committed Sep 9, 2024
1 parent 60c659e commit b4e5872
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 40 deletions.
78 changes: 39 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/Http/Validator/ArrayList.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public function getDescription(): string
$msg .= ' no longer than ' . $this->length . ' items';
}

return $msg . ' and ' . $this->validator->getDescription();
if (!empty($this->validator->getDescription())) {
$msg .= ' and ' . $this->validator->getDescription();
}

return $msg;
}

/**
Expand Down

0 comments on commit b4e5872

Please sign in to comment.