File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
http-api/src/main/java/io/avaje/http/api Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 9
9
import java .lang .annotation .Target ;
10
10
11
11
/**
12
- *
13
- * Add @Valid annotation on a controller/method/BeanParam that we want bean validation to be included for.
14
- * When we do this controller methods that take a request payload will then have the request bean
15
- * (populated by JSON payload or form parameters) validated before it is passed to the controller
16
- * method.
17
- *
18
- * When trying to validate a @BeanParam bean, this will need to be placed on the BeanParam type
19
-
12
+ * Add {@code @Valid} annotation on a controller/method/BeanParam that we want bean validation to
13
+ * be included for. When we do this controller methods that take a request payload will then have
14
+ * the request bean (populated by JSON payload or form parameters) validated before it is passed
15
+ * to the controller method.
16
+ * <p>
17
+ * When trying to validate a {@code @BeanParam} bean, this will need to be placed on the BeanParam type.
18
+ * <p>
19
+ * When using this annotation we need to provide an implementation of {@link Validator} to use.
20
+ * <p>
21
+ * Alternatively we can use the Jakarta {@code @Valid} along with a Jakarta validator implementation.
20
22
*/
21
23
@ Retention (SOURCE )
22
24
@ Target ({METHOD , TYPE , PARAMETER })
23
- public @interface Valid {}
25
+ public @interface Valid {
26
+ }
You can’t perform that action at this time.
0 commit comments