class RecursiveValidator implements ValidatorInterface
Recursive implementation of {@link ValidatorInterface}.
Methods
__construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) Creates a new validator. | ||
ContextualValidatorInterface | startContext($root = null) Starts a new validation context and returns a validator for that context. | |
ContextualValidatorInterface | inContext(ExecutionContextInterface $context) Returns a validator in the given execution context. | |
MetadataInterface | getMetadataFor($object) Returns the metadata for the given value. | |
bool | hasMetadataFor($object) Returns whether the class is able to return metadata for the given value. | |
ConstraintViolationListInterface | validate(mixed $value, Constraint|Constraint[] $constraints = null, array|null $groups = null) Validates a value against a constraint or a list of constraints. | |
ConstraintViolationListInterface | validateProperty(object $object, string $propertyName, array|null $groups = null) Validates a property of an object against the constraints specified for this property. | |
ConstraintViolationListInterface | validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, array|null $groups = null) Validates a value against the constraints specified for an object's property. |
Details
__construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array())
Creates a new validator.
ContextualValidatorInterface startContext($root = null)
Starts a new validation context and returns a validator for that context.
The returned validator collects all violations generated within its context. You can access these violations with the {@link ContextualValidatorInterface::getViolations()} method.
ContextualValidatorInterface inContext(ExecutionContextInterface $context)
Returns a validator in the given execution context.
The returned validator adds all generated violations to the given context.
MetadataInterface getMetadataFor($object)
Returns the metadata for the given value.
bool hasMetadataFor($object)
Returns whether the class is able to return metadata for the given value.
ConstraintViolationListInterface validate(mixed $value, Constraint|Constraint[] $constraints = null, array|null $groups = null)
Validates a value against a constraint or a list of constraints.
If no constraint is passed, the constraint {@link \Symfony\Component\Validator\Constraints\Valid} is assumed.
ConstraintViolationListInterface validateProperty(object $object, string $propertyName, array|null $groups = null)
Validates a property of an object against the constraints specified for this property.
ConstraintViolationListInterface validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, array|null $groups = null)
Validates a value against the constraints specified for an object's property.
Please login to continue.