Skip to content

Commit

Permalink
Merge pull request #144 from utopia-php/fix-array-list-validator
Browse files Browse the repository at this point in the history
fix: adding a validator description to the arraylist
  • Loading branch information
christyjacob4 authored Sep 9, 2024
2 parents 854fc3a + b4e5872 commit d9aa291
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 d9aa291

Please sign in to comment.