Interface

Symfony\Component\Validator\ValidatorInterface

interface ValidatorInterface

Validates a given value.

Methods

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.

ClassMetadataFactoryInterface getMetadataFactory()

Returns the factory for ClassMetadata instances

Details

at line 35
public ConstraintViolationList validate(object $object, array|null $groups = null)

Validate the given object.

Parameters

object $object The object to validate
array|null $groups The validator groups to use for validating

Return Value

ConstraintViolationList

at line 48
public ConstraintViolationList validateProperty(object $object, string $property, array|null $groups = null)

Validate a single property of an object against its current value.

Parameters

object $object The object to validate
string $property The name of the property to validate
array|null $groups The validator groups to use for validating

Return Value

ConstraintViolationList

at line 62
public ConstraintViolationList validatePropertyValue(string $class, string $property, string $value, array|null $groups = null)

Validate a single property of an object against the given value.

Parameters

string $class The class on which the property belongs
string $property The name of the property to validate
string $value
array|null $groups The validator groups to use for validating

Return Value

ConstraintViolationList

at line 75
public ConstraintViolationList validateValue(mixed $value, Constraint $constraint, array|null $groups = null)

Validates a given value against a specific Constraint.

Parameters

mixed $value The value to validate
Constraint $constraint The constraint to validate against
array|null $groups The validator groups to use for validating

Return Value

ConstraintViolationList

at line 84
public ClassMetadataFactoryInterface getMetadataFactory()

Returns the factory for ClassMetadata instances