Annotation Type Length

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String fieldKey
      The key for formatting the field
      int max
      The maximum length of the field
      String maxKey
      The key max violation message
      String maxMessage
      Default message if max violation message isn't found
      int min
      The maximum length of the field
      String minKey
      The key min violation message
      String minMessage
      Default message if min violation message isn't found
    • Element Detail

      • max

        int max
        The maximum length of the field
        Default:
        -1
      • min

        int min
        The maximum length of the field
        Default:
        -1
      • maxKey

        String maxKey
        The key max violation message
        Returns:
        The key of the max violation message
        Default:
        "validation.length.max.violation"
      • maxMessage

        String maxMessage
        Default message if max violation message isn't found
        Returns:
        The default message
        Default:
        "{0} exceeds maximum length of {1}"
      • minKey

        String minKey
        The key min violation message
        Returns:
        The key of the min violation message
        Default:
        "validation.length.min.violation"
      • minMessage

        String minMessage
        Default message if min violation message isn't found
        Returns:
        The default message
        Default:
        "{0} is less than minimum length of {1}"
      • fieldKey

        String fieldKey
        The key for formatting the field
        Returns:
        The key
        Default:
        ""