Annotation Interface Range


@Retention(RUNTIME) @Target({FIELD,METHOD}) @Documented @Constraint(validatedBy=RangeValidator.class) public @interface Range
Constraint validates the data is within the range of min to max or ${...} or null.
Author:
Shing Wai Chan
  • Element Details

    • min

      int min
      Default:
      0
    • max

      int max
      Default:
      0
    • message

      String message
      Default:
      "must be between {min} and {max} or property substitution (a string starting with \"${\" and ending with \"}\""
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      Default:
      {}
    • groups

      Class<?>[] groups
      Default:
      {}