class Validator implements ValidatorInterface
The default implementation of the ValidatorInterface.
This service can be used to validate objects, properties and raw values
against constraints.
Methods
| __construct(ClassMetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $validatorInitializers = array()) | ||
| ClassMetadataFactoryInterface |
getMetadataFactory()
Returns the factory for ClassMetadata instances |
|
| ConstraintViolationList |
validate(object $object, array|null $groups = null)
Validate the given object. |
|
| ConstraintViolationList |
validateProperty(object $object, string $property, array|null $groups = null)
Validate a single property of an object against its current value. |
|
| ConstraintViolationList |
validatePropertyValue(string $class, string $property, string $value, array|null $groups = null)
Validate a single property of an object against the given value. |
|
| ConstraintViolationList |
validateValue(mixed $value, Constraint $constraint, array|null $groups = null)
Validates a given value against a specific Constraint. |
Details
at line 33
public
__construct(ClassMetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $validatorInitializers = array())
at line 47
public ClassMetadataFactoryInterface
getMetadataFactory()
Returns the factory for ClassMetadata instances
at line 57
public ConstraintViolationList
validate(object $object, array|null $groups = null)
Validate the given object.
at line 73
public ConstraintViolationList
validateProperty(object $object, string $property, array|null $groups = null)
Validate a single property of an object against its current value.
at line 89
public ConstraintViolationList
validatePropertyValue(string $class, string $property, string $value, array|null $groups = null)
Validate a single property of an object against the given value.
at line 105
public ConstraintViolationList
validateValue(mixed $value, Constraint $constraint, array|null $groups = null)
Validates a given value against a specific Constraint.