Package org.aoju.bus.validate.annotation
Annotation Interface IntRange
@Documented
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,METHOD,PARAMETER,FIELD})
@Complex(value="IntRange",
clazz=IntRangeStrategy.class)
public @interface IntRange
判断数字在int范围内
默认被校验对象是null时,通过校验
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Optional Element Summary
Optional Elements
-
Element Details
-
min
小于等于- Returns:
- the int
- Default:
-2147483648
-
max
大于等于- Returns:
- the int
- Default:
2147483647
-
errcode
String errcode默认使用的异常码- Returns:
- the string
- Default:
"-1"
-
errmsg
String errmsg默认使用的异常信息- Returns:
- the string
- Default:
"${field}\u5fc5\u987b\u5728\u6307\u5b9a\u8303\u56f4\u5185, \u6700\u5c0f: ${min}, \u6700\u5927: ${max}"
-
group
String[] group校验器组- Returns:
- the string
- Default:
{}
-
field
String field被校验字段名称- Returns:
- the string
- Default:
"field"
-