ValidatorException

class ValidatorException extends RuntimeException

ValidatorBuilderInterface::setMetadataFactory()

ValidatorBuilderInterface setMetadataFactory(MetadataFactoryInterface $metadataFactory) Sets the class metadata factory used by the validator. Parameters MetadataFactoryInterface $metadataFactory The metadata factory Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::setTranslator()

ValidatorBuilderInterface setTranslator(TranslatorInterface $translator) Sets the translator used for translating violation messages. Parameters TranslatorInterface $translator The translator instance Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::setMetadataCache()

ValidatorBuilderInterface setMetadataCache(CacheInterface $cache) Sets the cache for caching class metadata. Parameters CacheInterface $cache The cache instance Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::setTranslationDomain()

ValidatorBuilderInterface setTranslationDomain(string $translationDomain) Sets the default translation domain of violation messages. The same message can have different translations in different domains. Pass the domain that is used for violation messages by default to this method. Parameters string $translationDomain The translation domain of the violation messages Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::setConstraintValidatorFactory()

ValidatorBuilderInterface setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory) Sets the constraint validator factory used by the validator. Parameters ConstraintValidatorFactoryInterface $validatorFactory The validator factory Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::disableAnnotationMapping()

ValidatorBuilderInterface disableAnnotationMapping() Disables annotation based constraint mapping. Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::enableAnnotationMapping()

ValidatorBuilderInterface enableAnnotationMapping(Reader $annotationReader = null) Enables annotation based constraint mapping. Parameters Reader $annotationReader The annotation reader to be used Return Value ValidatorBuilderInterface The builder object

ValidatorBuilderInterface::getValidator()

ValidatorInterface getValidator() Builds and returns a new validator object. Return Value ValidatorInterface The built validator

ValidatorBuilderInterface::addYamlMappings()

ValidatorBuilderInterface addYamlMappings(array $paths) Adds a list of YAML constraint mappings file to the validator. Parameters array $paths The paths to the mapping files Return Value ValidatorBuilderInterface The builder object