Skip to content

Commit faac008

Browse files
committed
[Validator] Allow Sequentially constraints on classes
1 parent 1da830d commit faac008

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Constraints/Sequentially.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Validation for the nested constraints collection will stop at first violation.
1717
*
1818
* @Annotation
19-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
19+
* @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
2020
*
2121
* @author Maxime Steinhausser <[email protected]>
2222
*/
@@ -38,4 +38,9 @@ protected function getCompositeOption()
3838
{
3939
return 'constraints';
4040
}
41+
42+
public function getTargets()
43+
{
44+
return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT];
45+
}
4146
}

0 commit comments

Comments
 (0)