批注接口 ValidErrorCode
Custom annotation for marking enums that need error code validation.
This annotation is used to configure how error codes within an enum should be validated.
-
可选元素概要
可选元素修饰符和类型可选元素说明Specifies the name of the field within the enum constant that holds the error code.int[]An array of integer values that will skip validation.intConfigurable total length for the error code (in digits).Configurable prefix for the error code.
-
元素详细资料
-
prefix
String prefixConfigurable prefix for the error code. The default value is "1122".- 返回:
- The prefix for the error code.
- 默认值:
"1122"
-
length
int lengthConfigurable total length for the error code (in digits). The default value is 8 digits.- 返回:
- The total length of the error code.
- 默认值:
8
-
codeField
String codeFieldSpecifies the name of the field within the enum constant that holds the error code. The default value is "code".- 返回:
- The name of the error code field.
- 默认值:
"code"
-
excludeValues
int[] excludeValuesAn array of integer values that will skip validation. By default, it excludes 0 (which usually represents success or OK).- 返回:
- An array of values to exclude from validation.
- 默认值:
{0}
-