diff --git a/templates/validator/Constraint.tpl.php b/templates/validator/Constraint.tpl.php index 414c19eeb..3ae323f8f 100644 --- a/templates/validator/Constraint.tpl.php +++ b/templates/validator/Constraint.tpl.php @@ -7,7 +7,7 @@ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] getClassDeclaration(); ?> { - public string $message = 'The string "{{ string }}" contains an illegal character: it can only contain letters or numbers.'; + public string $message = 'The string "{{ value }}" contains an illegal character: it can only contain letters or numbers.'; // You can use #[HasNamedArguments] to make some constraint options required. // All configurable options must be passed to the constructor. diff --git a/tests/fixtures/make-validator/expected/FooBar.php b/tests/fixtures/make-validator/expected/FooBar.php index 40bbd5087..75413d723 100644 --- a/tests/fixtures/make-validator/expected/FooBar.php +++ b/tests/fixtures/make-validator/expected/FooBar.php @@ -7,7 +7,7 @@ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] final class FooBar extends Constraint { - public string $message = 'The string "{{ string }}" contains an illegal character: it can only contain letters or numbers.'; + public string $message = 'The string "{{ value }}" contains an illegal character: it can only contain letters or numbers.'; // You can use #[HasNamedArguments] to make some constraint options required. // All configurable options must be passed to the constructor.