From 1e02a962863fac2f519683cd512e0b8ca9145497 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Fri, 21 Feb 2020 15:09:54 +0100 Subject: [PATCH] [Validator] Allow Sequentially constraints on classes --- .../Component/Validator/Constraints/Sequentially.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/Sequentially.php b/src/Symfony/Component/Validator/Constraints/Sequentially.php index c291daf55054..0bae6f82b742 100644 --- a/src/Symfony/Component/Validator/Constraints/Sequentially.php +++ b/src/Symfony/Component/Validator/Constraints/Sequentially.php @@ -16,7 +16,7 @@ * Validation for the nested constraints collection will stop at first violation. * * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) * * @author Maxime Steinhausser */ @@ -38,4 +38,9 @@ protected function getCompositeOption() { return 'constraints'; } + + public function getTargets() + { + return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; + } }