Package org.aoju.bus.validate.annotation
Annotation Interface Each
@Documented
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,METHOD,PARAMETER,FIELD})
@Complex(value="Each",
clazz=EachStrategy.class)
public @interface Each
对数组、集合、Map元素进行校验, 注意,Map对象,只校验内部的值列表
对象为null, 忽略校验
如果不是数组或集合、Map,则忽略校验
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String[] value校验器名称数组,优先使用校验器名称中的校验器,并忽略校验器类中的校验器- Returns:
- the array
- Default:
{}
-
classes
校验器类数组, 当校验器名称数组为空时,使用校验器类数组中的校验器- Returns:
- the object
- Default:
{}
-
errcode
String errcode默认使用的异常码- Returns:
- the string
- Default:
"-1"
-
errmsg
String errmsg默认使用的异常信息- Returns:
- the string
- Default:
"${field}\u53c2\u6570\u6821\u9a8c\u5931\u8d25"
-
group
String[] group校验器组- Returns:
- the array
- Default:
{}
-
field
String field被校验字段名称- Returns:
- the string
- Default:
"field"
-