Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e02a96

Browse filesBrowse files
committed
[Validator] Allow Sequentially constraints on classes
1 parent 269c4a2 commit 1e02a96
Copy full SHA for 1e02a96

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎src/Symfony/Component/Validator/Constraints/Sequentially.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/Sequentially.php
+6-1Lines 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 <maxime.steinhausser@gmail.com>
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.