Annotation Interface MinDuration


The annotated element must be a Duration whose value must be higher or equal to the specified minimum.
null elements are considered valid
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    long
    The annotation's value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The groups the constraint belongs to.
    boolean
    If the boundary value is inclusive or not.
    The validation message for this constraint.
    Class<? extends jakarta.validation.Payload>[]
    The payloads of this constraint.
    The unit of the annotation.
  • Element Details

    • value

      long value
      The annotation's value.
      Returns:
      value the element must be higher or equal to
    • message

      String message
      The validation message for this constraint.
      Returns:
      the message
      Default:
      "must be greater than ${inclusive == true ? \'or equal to \' : \'\'}{value} {unit}"
    • groups

      Class<?>[] groups
      The groups the constraint belongs to.
      Returns:
      an array of classes representing the groups
      Default:
      {}
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      The payloads of this constraint.
      Returns:
      the array of payload classes
      Default:
      {}
    • unit

      TimeUnit unit
      The unit of the annotation.
      Returns:
      unit of the value the element must be higher or equal to
      Default:
      SECONDS
    • inclusive

      boolean inclusive
      If the boundary value is inclusive or not.
      Returns:
      true if the validation is to allow values equal to value(). False if the validation is to be exclusive. Defaults to true.
      Default:
      true