Symfony ValidatorComponent > AnnotationMapping in FormComponent
问题 Im working on a project where I'm using some Symfony Components. My problem is how to make the Form Component's validation of Forms use AnnotationMapping to find the constraints. SetUp: global $loader; //composer - autoload AnnotationRegistry::registerLoader([$loader, 'loadClass']); $validator = Validation::createValidatorBuilder() ->enableAnnotationMapping() ->getValidator(); $formFactory = Forms::createFormFactoryBuilder() [...] ->addExtension(new ValidatorExtension($validator)) -