Enum Class ValidationError.ErrorType
- All Implemented Interfaces:
Serializable, Comparable<ValidationError.ErrorType>, Constable
- Enclosing class:
ValidationError
Error type enumeration for categorizing validation errors.
用于分类验证错误的错误类型枚举。
- Since:
- JDK 25, opencode-base-yml V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA custom validation rule failed.A required key is missing.The value is outside the allowed range.The value does not match the required pattern.The value type does not match the expected type. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationError.ErrorTypeReturns the enum constant of this class with the specified name.static ValidationError.ErrorType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MISSING_REQUIRED
A required key is missing. 缺少必需的键。 -
TYPE_MISMATCH
The value type does not match the expected type. 值类型与预期类型不匹配。 -
OUT_OF_RANGE
The value is outside the allowed range. 值超出允许范围。 -
PATTERN_MISMATCH
The value does not match the required pattern. 值不匹配要求的模式。 -
CUSTOM_RULE_FAILED
A custom validation rule failed. 自定义验证规则失败。
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-