Skip to content

Commit d9aa291

Browse files
Merge pull request #144 from utopia-php/fix-array-list-validator
fix: adding a validator description to the arraylist
2 parents 854fc3a + b4e5872 commit d9aa291

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

composer.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Http/Validator/ArrayList.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public function getDescription(): string
5050
$msg .= ' no longer than ' . $this->length . ' items';
5151
}
5252

53-
return $msg . ' and ' . $this->validator->getDescription();
53+
if (!empty($this->validator->getDescription())) {
54+
$msg .= ' and ' . $this->validator->getDescription();
55+
}
56+
57+
return $msg;
5458
}
5559

5660
/**

0 commit comments

Comments
 (0)