Skip to content

Commit

Permalink
Fixed maxLength 0 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sorinsarca committed Sep 29, 2024
1 parent c09b18d commit 7edd781
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Keywords/MaxLengthKeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ public function __construct(int $length)
*/
public function validate(ValidationContext $context, Schema $schema): ?ValidationError
{
if ($this->length === 0) {
return null;
}

$length = $context->getStringLength();

if ($length <= $this->length) {
Expand Down

0 comments on commit 7edd781

Please sign in to comment.