Annotation Interface CustomSize


Validation constraint for custom size limits based on configuration keys.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The validation groups this constraint belongs to.
    Gets the configuration key for the maximum size constraint.
    The error message when validation fails.
    Gets the configuration key for the minimum size constraint.
    Class<? extends jakarta.validation.Payload>[]
    The payload associated with this constraint.
  • Element Details

    • message

      String message
      The error message when validation fails.
      Returns:
      the error message
      Default:
      "{jakarta.validation.constraints.Size.message}"
    • groups

      Class<?>[] groups
      The validation groups this constraint belongs to.
      Returns:
      the groups
      Default:
      {}
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      The payload associated with this constraint.
      Returns:
      the payload
      Default:
      {}
    • minKey

      String minKey
      Gets the configuration key for the minimum size constraint.
      Returns:
      name of size the element must be higher or equal to
      Default:
      ""
    • maxKey

      String maxKey
      Gets the configuration key for the maximum size constraint.
      Returns:
      name of size the element must be lower or equal to
      Default:
      ""