We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3807403 commit 0efb8feCopy full SHA for 0efb8fe
docs/src/main/asciidoc/validation.adoc
@@ -303,7 +303,11 @@ You don't have to wire anything.
303
====
304
Obviously, for each listed type, you can declare only one bean.
305
306
-These beans should be declared as `@ApplicationScoped`.
+Most of the time, these beans should be declared as `@ApplicationScoped`.
307
+
308
+However, in the case of ``ConstraintValidator``s that are dependent of attributes of the constraint annotation
309
+(typically when implementing the `initialize(A constraintAnnotation)` method),
310
+use the `@Dependent` scope to make sure each annotation context has a separate instance of the `ConstraintValidator` bean.
311
312
313
==== Constraint validators as beans
0 commit comments