Package ninja.validation
Annotation Type IsEnum
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface IsEnum
Validates that the field is a valid enum constant. Only needed if you want to customise the validation messages.- Author:
- James Moger
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
caseSensitive
The flag to determine if validation is case-sensitive.String
fieldKey
The key for formatting the fieldString
key
The key for the violation messageString
message
Default message if the key isn't found
-
-
-
Field Detail
-
KEY
static final String KEY
-
-
-
MESSAGE
static final String MESSAGE
-
-
-
key
String key
The key for the violation message- Returns:
- The key of the violation message
- Default:
- "validation.is.enum.violation"
-
-
-
message
String message
Default message if the key isn't found- Returns:
- The default message
- Default:
- "{0} is not a valid enum constant"
-
-
-
fieldKey
String fieldKey
The key for formatting the field- Returns:
- The key
- Default:
- ""
-
-