From 7edd7818493077308cb917ec523f4c7606ed8b63 Mon Sep 17 00:00:00 2001 From: Sorin Sarca Date: Sun, 29 Sep 2024 23:58:07 +0300 Subject: [PATCH] Fixed maxLength 0 bug --- src/Keywords/MaxLengthKeyword.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Keywords/MaxLengthKeyword.php b/src/Keywords/MaxLengthKeyword.php index 3afa2b3..81b3cc5 100644 --- a/src/Keywords/MaxLengthKeyword.php +++ b/src/Keywords/MaxLengthKeyword.php @@ -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) {