@Retention(RUNTIME) @Target(FIELD) public @interface Min
Validates that a numeric field has a minimum value.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    long
    The minimum value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The error message.
    The suggestion shown after the error message describing how to fix it.
  • Element Details

    • value

      long value
      The minimum value.
      Returns:
      the minimum value
    • message

      String message
      The error message.
      Returns:
      the message
      Default:
      "Value must be at least {value}"
    • suggestion

      String suggestion
      The suggestion shown after the error message describing how to fix it. Supports the same {...} placeholders as message() (substituted at validation time). Set to an empty string to omit the suggestion entirely.
      Returns:
      the suggestion template
      Default:
      "Use a value >= {value}"