Annotation Interface MinLength


@Retention(RUNTIME) @Target(FIELD) public @interface MinLength
Annotation that marks that an options value is restricted to a minimum length (which is inclusive)

If you simply wish to require that an option have a non-empty value then use NotEmpty instead. Alternatively for a range of lengths you can use LengthRange or for an exact length you can use ExactLength.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Minimum required length (inclusive)
  • Element Details

    • length

      int length
      Minimum required length (inclusive)
      Returns:
      Minimum length (inclusive)
      Default:
      0