'@Digits Bean Validation Constraint for minimum number of fractional digits
I am looking for a possibility to set the number of fractional digits in my java spring project to exactly 3. When I use @Digits(integer=3, fraction=3) this would also include two fractional digits. But for my case I need exactly three (example: 123.324). The datatype is BigDecimal. The documentation bean-validation only says:
the fraction element specifies the maximum fractional digits for the number.
Is there a way to do this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
