Package ninja.validation
Annotation Type NumberValue
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface NumberValue
Validates that the value of a number meets certain parameters- Author:
- James Roper
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
fieldKey
The key for formatting the fielddouble
max
The maximum value of the fieldString
maxKey
The key max violation messageString
maxMessage
Default message if max violation message isn't founddouble
min
The minimum value of the fieldString
minKey
The key min violation messageString
minMessage
Default message if min violation message isn't found
-
-
-
-
maxKey
String maxKey
The key max violation message- Returns:
- The key of the max violation message
- Default:
- "validation.number.max.violation"
-
-
-
maxMessage
String maxMessage
Default message if max violation message isn't found- Returns:
- The default message
- Default:
- "{0} exceeds maximum value of {1}"
-
-
-
minKey
String minKey
The key min violation message- Returns:
- The key of the min violation message
- Default:
- "validation.number.min.violation"
-
-
-
minMessage
String minMessage
Default message if min violation message isn't found- Returns:
- The default message
- Default:
- "{0} is less than minimum value of {1}"
-
-
-
fieldKey
String fieldKey
The key for formatting the field- Returns:
- The key
- Default:
- ""
-
-