Annotation Interface Digits


Specify the number of maximal allowed digits for the fraction part and the digit size. This annotation can be applied to
  • BigDecimal
  • BigInteger
  • String
  • invalid input: '<'byte and Byte/li>
  • invalid input: '<'short and Short/li>
  • invalid input: '<'int and Integer /li>
  • invalid input: '<'long and Long/li>
Float and double are not portably supported due to rounding issues.
Version:
$Rev$ $Date$
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
     
    int
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
     
     
    Class<? extends Payload>[]
     
  • Element Details

    • message

      String message
      Default:
      "{javax.validation.constraints.Digits.message}"
    • groups

      Class<?>[] groups
      Default:
      {}
    • payload

      Class<? extends Payload>[] payload
      Default:
      {}
    • integer

      int integer
      Returns:
      the maximum allowed digit size
    • fraction

      int fraction
      Returns:
      the maximum allowed number of fraction digits.