File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -106,15 +106,15 @@ prefixed classes included in doc block comments (``/** ... */``). For example::
106106 }
107107
108108To enable the annotation loader, call the
109- :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::enableAnnotationMapping ` method
110- and then call `` addDefaultDoctrineAnnotationReader() `` to use Doctrine's
111- annotation reader::
109+ :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::enableAnnotationMapping ` method.
110+ If you use annotations instead of attributes, it's also required to call
111+ `` addDefaultDoctrineAnnotationReader() `` to use Doctrine's annotation reader::
112112
113113 use Symfony\Component\Validator\Validation;
114114
115115 $validator = Validation::createValidatorBuilder()
116- ->enableAnnotationMapping(true )
117- ->addDefaultDoctrineAnnotationReader()
116+ ->enableAnnotationMapping()
117+ ->addDefaultDoctrineAnnotationReader() // Only if annotations are used
118118 ->getValidator();
119119
120120To disable the annotation loader after it was enabled, call
You can’t perform that action at this time.
0 commit comments