ValidatorInterface 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

ValidatorInterface::startContext()

ContextualValidatorInterface startContext() 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. Return Value ContextualValidatorInterface The validator for the new context

ValidatorInterface::inContext()

ContextualValidatorInterface inContext(ExecutionContextInterface $context) Returns a validator in the given execution context. The returned validator adds all generated violations to the given context. Parameters ExecutionContextInterface $context The execution context Return Value ContextualValidatorInterface The validator for that context

ValidatorInterface deprecated::validateValue()

ConstraintViolationListInterface validateValue(mixed $value, Constraint|Constraint[] $constraints, array|null $groups = null) deprecated deprecated since version 2.5, to be removed in 3.0. Renamed to {@link Validator\ValidatorInterface::validate()} in Symfony 2.5. 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 v

ValidatorInterface deprecated::getMetadataFactory()

MetadataFactoryInterface getMetadataFactory() deprecated deprecated since version 2.5, to be removed in 3.0. Use {@link Validator\ValidatorInterface::getMetadataFor()} or {@link Validator\ValidatorInterface::hasMetadataFor()} instead. Returns the factory for metadata instances. Return Value MetadataFactoryInterface The metadata factory.

ValidatorInterface 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

ValidatorInterface deprecated

interface ValidatorInterface deprecated since version 2.5, to be removed in 3.0. Use {@link \Symfony\Component\Validator\Validator\ValidatorInterface} instead. Validates values and graphs of objects and arrays. Methods ConstraintViolationListInterface validate(mixed $value, array|null $groups = null, bool $traverse = false, bool $deep = false) Validates a value. ConstraintViolationListInterface validateProperty(mixed $containingValue, string $property, array|null $groups = null)

ValidatorInterface 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

ValidatorInterface

interface ValidatorInterface implements MetadataFactoryInterface Validates PHP values against constraints. Methods MetadataInterface getMetadataFor(mixed $value) Returns the metadata for the given value. from MetadataFactoryInterface bool hasMetadataFor(mixed $value) Returns whether the class is able to return metadata for the given value. from MetadataFactoryInterface ConstraintViolationListInterface validate(mixed $value, Constraint|Constraint[] $constraints = null, array|null

ValidatorExtension

class ValidatorExtension extends AbstractExtension Extension supporting the Symfony Validator component in forms. Methods FormTypeInterface getType(string $name) Returns a type by name. from AbstractExtension bool hasType(string $name) Returns whether the given type is supported. from AbstractExtension FormTypeExtensionInterface[] getTypeExtensions(string $name) Returns the extensions for the given type. from AbstractExtension bool hasTypeExtensions(string $name) Returns whet