ValidationVisitor deprecated::getVisitor()

ValidationVisitorInterface getVisitor() Returns the visitor instance used to validate the object graph nodes. Return Value ValidationVisitorInterface The validation visitor.

ValidationVisitor deprecated::getViolations()

ConstraintViolationListInterface getViolations() Returns the violations generated by the validator so far. Return Value ConstraintViolationListInterface A list of constraint violations.

ValidationVisitor deprecated::getValidatorFactory()

ConstraintValidatorFactoryInterface getValidatorFactory() Returns the factory for constraint validators. Return Value ConstraintValidatorFactoryInterface The constraint validator factory.

ValidationVisitor deprecated

class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionContextInterface deprecated since version 2.5, to be removed in 3.0. Default implementation of {@link ValidationVisitorInterface} and {@link GlobalExecutionContextInterface}. Methods __construct(mixed $root, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, string|null $translationDomain = null, array $objectInitializers = arra

ValidationListener::getSubscribedEvents()

static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) a

ValidationListener::validateForm()

validateForm(FormEvent $event) Validates the form and its domain object. Parameters FormEvent $event The event object

Validation::createValidator()

static ValidatorInterface createValidator() Creates a new validator. If you want to configure the validator, use {@link createValidatorBuilder()} instead. Return Value ValidatorInterface The new validator

ValidationBuilder

class ValidationBuilder This class builds validation conditions. Properties $rules Methods __construct(NodeDefinition $node) Constructor. ExprBuilder|ValidationBuilder rule(Closure $closure = null) Registers a closure to run as normalization or an expression builder to build it if null is provided. Details __construct(NodeDefinition $node) Constructor. Parameters NodeDefinition $node The related node Expr

Validation::createValidatorBuilder()

static ValidatorBuilderInterface createValidatorBuilder() Creates a configurable builder for validator objects. Return Value ValidatorBuilderInterface The new builder

ValidationListener

class ValidationListener implements EventSubscriberInterface Methods static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. __construct(ValidatorInterface $validator, ViolationMapperInterface $violationMapper) validateForm(FormEvent $event) Validates the form and its domain object. Details static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to