Annotation Type MaxLength


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

    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 length
      Maximum allowed length (inclusive)
    • Element Detail

      • length

        int length
        Maximum allowed length (inclusive)
        Returns:
        Maximum length (inclusive)
        Default:
        2147483647