Annotation Interface Range
Validates that a numeric field is within a range.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe error message.The suggestion shown after the error message describing how to fix it.
-
Element Details
-
min
long minThe minimum value.- Returns:
- the minimum value
-
max
long maxThe maximum value.- Returns:
- the maximum value
-
-
-
message
String messageThe error message.- Returns:
- the message
- Default:
- "Value must be between {min} and {max}"
-
suggestion
String suggestionThe suggestion shown after the error message describing how to fix it. Supports the same{...}placeholders asmessage()(substituted at validation time). Set to an empty string to omit the suggestion entirely.- Returns:
- the suggestion template
- Default:
- "Use a value between {min} and {max}"
-