[Validator] Remove specific check for Valid targets
This commit is contained in:
parent
643f34ff59
commit
0086562c77
@ -14,7 +14,6 @@ namespace Symfony\Component\Validator\Mapping;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\Constraints\GroupSequence;
|
||||
use Symfony\Component\Validator\Constraints\Traverse;
|
||||
use Symfony\Component\Validator\Constraints\Valid;
|
||||
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
|
||||
use Symfony\Component\Validator\Exception\GroupDefinitionException;
|
||||
|
||||
@ -183,10 +182,6 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
|
||||
throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint)));
|
||||
}
|
||||
|
||||
if ($constraint instanceof Valid) {
|
||||
throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint)));
|
||||
}
|
||||
|
||||
if ($constraint instanceof Traverse) {
|
||||
if ($constraint->traverse) {
|
||||
// If traverse is true, traversal should be explicitly enabled
|
||||
|
Reference in New Issue
Block a user