ValidatorBuilder::addObjectInitializers()

ValidatorBuilderInterface addObjectInitializers(array $initializers) Adds a list of object initializers to the validator. Parameters array $initializers The initializer Return Value ValidatorBuilderInterface The builder object

ValidatorBuilder::addObjectInitializer()

ValidatorBuilderInterface addObjectInitializer(ObjectInitializerInterface $initializer) Adds an object initializer to the validator. Parameters ObjectInitializerInterface $initializer The initializer Return Value ValidatorBuilderInterface The builder object

ValidatorBuilder::addMethodMappings()

ValidatorBuilderInterface addMethodMappings(array $methodNames) Enables constraint mapping using the given static methods. Parameters array $methodNames The names of the methods Return Value ValidatorBuilderInterface The builder object

ValidatorBuilder::addMethodMapping()

ValidatorBuilderInterface addMethodMapping(string $methodName) Enables constraint mapping using the given static method. Parameters string $methodName The name of the method Return Value ValidatorBuilderInterface The builder object

ValidatorBuilder

class ValidatorBuilder implements ValidatorBuilderInterface The default implementation of {@link ValidatorBuilderInterface}. Methods ValidatorBuilderInterface addObjectInitializer(ObjectInitializerInterface $initializer) Adds an object initializer to the validator. ValidatorBuilderInterface addObjectInitializers(array $initializers) Adds a list of object initializers to the validator. ValidatorBuilderInterface addXmlMapping(string $path) Adds an XML constraint mapping file to t

Validator deprecated::validateValue()

ConstraintViolationListInterface validateValue(mixed $value, Constraint|Constraint[] $constraints, array|null $groups = null) Validates a value against a constraint or a list of constraints. Parameters mixed $value The value to validate. Constraint|Constraint[] $constraints The constraint(s) to validate against. array|null $groups The validation groups to validate. Return Value ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation

Validator deprecated::validatePropertyValue()

ConstraintViolationListInterface validatePropertyValue(mixed $containingValue, string $property, string $value, array|null $groups = null) Validate a property of a value against a potential value. The accepted values depend on the {@link MetadataFactoryInterface} implementation. Parameters mixed $containingValue The value containing the property. string $property The name of the property to validate string $value The value to validate against the constraints of the property. a

Validator deprecated::validateProperty()

ConstraintViolationListInterface validateProperty(mixed $containingValue, string $property, array|null $groups = null) Validates a property of a value against its current value. The accepted values depend on the {@link MetadataFactoryInterface} implementation. Parameters mixed $containingValue The value containing the property. string $property The name of the property to validate. array|null $groups The validation groups to validate. Return Value ConstraintViolationListInterf

Validator deprecated::validate()

ConstraintViolationListInterface validate(mixed $value, array|null $groups = null, bool $traverse = false, bool $deep = false) Validates a value. The accepted values depend on the {@link MetadataFactoryInterface} implementation. The signature changed with Symfony 2.5 (see {@link Validator\ValidatorInterface::validate()}. This signature will be disabled in Symfony 3.0. Parameters mixed $value The value to validate array|null $groups The validation groups to validate. bool $trav

Validator deprecated::hasMetadataFor()

bool hasMetadataFor(mixed $value) Returns whether the class is able to return metadata for the given value. Parameters mixed $value Some value Return Value bool Whether metadata can be returned for that value