Package javax.validation.constraints

# Annotation Interface Digits

@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(RUNTIME) @Documented @Constraint(validatedBy={}) public @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`
`Digits.List`

## Required Element Summary

Required Elements
Modifier and Type
Required Element
Description
`int`
`fraction`
`int`
`integer`

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`Class<?>[]`
`groups`
`String`
`message`
`Class<? extends Payload>[]`
`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.