diff --git a/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java b/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java index f0533b0ec..fc735d6e8 100644 --- a/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java +++ b/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java @@ -6,7 +6,14 @@ import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.*; -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE}) +@Target({ + ElementType.METHOD, + ElementType.FIELD, + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.PARAMETER, + ElementType.TYPE_USE +}) @Retention(RetentionPolicy.RUNTIME) @Documented @Constraint( @@ -22,6 +29,7 @@ public @interface InEnum { String message() default "必须在指定范围 {value}"; Class[] groups() default {}; + Class[] payload() default {}; }