From cdd2ac2ee4cd3aa92f7834ec0ebfd1c441ac206e Mon Sep 17 00:00:00 2001 From: piero-hgt Date: Thu, 9 Jan 2025 11:27:07 +0100 Subject: [PATCH] Allow to use PhoneNumber Constraint on methods --- src/Validator/Constraints/PhoneNumber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Validator/Constraints/PhoneNumber.php b/src/Validator/Constraints/PhoneNumber.php index 57093ea..b1f16dc 100644 --- a/src/Validator/Constraints/PhoneNumber.php +++ b/src/Validator/Constraints/PhoneNumber.php @@ -23,7 +23,7 @@ * @Annotation * @NamedArgumentConstructor */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)] +#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class PhoneNumber extends Constraint { public const ANY = 'any';