[Validator] Remove property and method targets from the optional and required constraints.
At the moment both constraints can only be defined on other annotations (specifically, the Collection annotation). Defining the required or optional annotation directly on a field or method throws a ClassNotFoundException, since the constraint validator factory tries to load the validator (which does not exist).
This commit is contained in:
parent
cff410507f
commit
9c2616e788
@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
* @Target({"ANNOTATION"})
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
* @Target({"ANNOTATION"})
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user