diff --git a/src/Rule/MaxLength.php b/src/Rule/MaxLength.php index 0820142..fc87748 100644 --- a/src/Rule/MaxLength.php +++ b/src/Rule/MaxLength.php @@ -15,6 +15,6 @@ public function isValid(Element $element, string $value, array $inputKvp):bool { public function getHint(Element $element, string $value):string { $maxLength = $element->getAttribute("maxlength"); - return "This field's value must contain $maxLength characters or less"; + return "This field's value must not contain more than $maxLength characters"; } } diff --git a/test/phpunit/Rule/MaxLengthTest.php b/test/phpunit/Rule/MaxLengthTest.php index 2263c8f..f7d4087 100644 --- a/test/phpunit/Rule/MaxLengthTest.php +++ b/test/phpunit/Rule/MaxLengthTest.php @@ -39,7 +39,7 @@ public function testMaxLength() { catch(ValidationException $exception) { $errorList = iterator_to_array($validator->getLastErrorList()); self::assertContains( - "This field's value must contain 120 characters or less", + "This field's value must not contain more than 120 characters", $errorList["tweet"] ); }