[Validator] Allow Sequentially constraints on classes

This commit is contained in:
Maxime Steinhausser 2020-02-21 15:09:54 +01:00
parent 269c4a2e15
commit 1e02a96286

View File

@ -16,7 +16,7 @@ namespace Symfony\Component\Validator\Constraints;
* Validation for the nested constraints collection will stop at first violation.
*
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
* @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*/
@ -38,4 +38,9 @@ class Sequentially extends Composite
{
return 'constraints';
}
public function getTargets()
{
return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT];
}
}