Validator deprecated
class Validator implements ValidatorInterface, MetadataFactoryInterface
deprecated
Default implementation of {@link ValidatorInterface}.
Methods
No description
Returns the factory for metadata instances.
Returns the metadata for the given value.
Returns whether the class is able to return metadata for the given value.
Validates a value.
Validates a property of a value against its current value.
Validate a property of a value against a potential value.
Validates a value against a constraint or a list of constraints.
Details
at line line 56
__construct(MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = 'validators', array $objectInitializers = array())
at line line 73
MetadataFactoryInterface
getMetadataFactory()
Returns the factory for metadata instances.
at line line 81
MetadataInterface
getMetadataFor(mixed $value)
Returns the metadata for the given value.
at line line 89
bool
hasMetadataFor(mixed $value)
Returns whether the class is able to return metadata for the given value.
at line line 97
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.
at line line 113
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.
at line line 144
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.
at line line 177
ConstraintViolationListInterface
validateValue(mixed $value, Constraint|Constraint[] $constraints, array|null $groups = null)
Validates a value against a constraint or a list of constraints.