diff --git a/eZ/Publish/Core/FieldType/Tests/StringLengthValidatorTest.php b/eZ/Publish/Core/FieldType/Tests/StringLengthValidatorTest.php index e354c7f20c5..8cd64825364 100644 --- a/eZ/Publish/Core/FieldType/Tests/StringLengthValidatorTest.php +++ b/eZ/Publish/Core/FieldType/Tests/StringLengthValidatorTest.php @@ -213,14 +213,14 @@ public function providerForValidateKO() return array( array( '', - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array('%size%' => $this->getMinStringLength()), ), array( 'Hi!', - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array('%size%' => $this->getMinStringLength()), ), array( @@ -231,8 +231,8 @@ public function providerForValidateKO() ), array( 'ABC♔', - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array('%size%' => $this->getMinStringLength()), ), ); diff --git a/eZ/Publish/Core/FieldType/Tests/TextLineTest.php b/eZ/Publish/Core/FieldType/Tests/TextLineTest.php index 6b66c2c9ec9..f7bc95abede 100644 --- a/eZ/Publish/Core/FieldType/Tests/TextLineTest.php +++ b/eZ/Publish/Core/FieldType/Tests/TextLineTest.php @@ -636,8 +636,8 @@ public function provideInvalidDataForValidate() new TextLineValue('aaa'), array( new ValidationError( - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array( '%size%' => 5, ), @@ -686,8 +686,8 @@ public function provideInvalidDataForValidate() 'text' ), new ValidationError( - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array( '%size%' => 10, ), @@ -707,8 +707,8 @@ public function provideInvalidDataForValidate() new TextLineValue('ABC♔'), array( new ValidationError( - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array( '%size%' => 5, ), diff --git a/eZ/Publish/Core/FieldType/TextLine/Type.php b/eZ/Publish/Core/FieldType/TextLine/Type.php index 79c4a2dfa74..3c5fe114cde 100644 --- a/eZ/Publish/Core/FieldType/TextLine/Type.php +++ b/eZ/Publish/Core/FieldType/TextLine/Type.php @@ -107,8 +107,8 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) $constraints['minStringLength'] !== 0 && mb_strlen($fieldValue->text) < $constraints['minStringLength']) { $validationErrors[] = new ValidationError( - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array( '%size%' => $constraints['minStringLength'], ), diff --git a/eZ/Publish/Core/FieldType/Validator/StringLengthValidator.php b/eZ/Publish/Core/FieldType/Validator/StringLengthValidator.php index 3cb6d5311f4..6042dc6b8ea 100644 --- a/eZ/Publish/Core/FieldType/Validator/StringLengthValidator.php +++ b/eZ/Publish/Core/FieldType/Validator/StringLengthValidator.php @@ -126,8 +126,8 @@ public function validate(BaseValue $value) $this->constraints['minStringLength'] !== 0 && mb_strlen($value->text) < $this->constraints['minStringLength']) { $this->errors[] = new ValidationError( - 'The string can not be shorter than %size% character.', - 'The string can not be shorter than %size% characters.', + 'The string cannot be shorter than %size% character.', + 'The string cannot be shorter than %size% characters.', array( '%size%' => $this->constraints['minStringLength'], )