Annotation Type Range
@Documented
@Constraint(validatedBy={})
@SupportedValidationTarget(ANNOTATED_ELEMENT)
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Min(0L)
@Max(9223372036854775807L)
@ReportAsSingleViolation
public @interface Range
The annotated element has to be in the appropriate range. Apply on numeric values or string
representation of the numeric value.
- Author:
- Hardy Ferentschik
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Defines several@Range
annotations on the same element. -
Optional Element Summary
Optional Elements
-
Element Details
-
min
@OverridesAttribute(constraint=jakarta.validation.constraints.Min.class, name="value") long min- Default:
- 0L
-
max
@OverridesAttribute(constraint=jakarta.validation.constraints.Max.class, name="value") long max- Default:
- 9223372036854775807L
-
message
String message- Default:
- "{org.hibernate.validator.constraints.Range.message}"
-
groups
Class<?>[] groups- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payload- Default:
- {}
-