Annotation Interface Size


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface Size
The annotated element size must be between the specified boundaries (included).

Supported types are:

  • String (length of character sequence is evaluated)

null elements are considered valid.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Returns size the element must be lower or equal to.
    int
    Returns size the element must be higher or equal to.
  • Element Details

    • min

      int min
      Returns size the element must be higher or equal to.
      Default:
      0
    • max

      int max
      Returns size the element must be lower or equal to.
      Default:
      2147483647