@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD,ANNOTATION_TYPE}) @Constraint(validatedBy=BigDecimalConstraintValidator.class) public @interface BigDecimalValidate
Example:
public class Employee {
@BigDecimalValidate(minDecimalPlaces = 1, maxDecimalPlaces = 10, maxFractionalPlaces = 2,
minValue = 0.00, maxValue = 5684.23)
public BigDecimal salery;
...
}
| Modifier and Type | Optional Element and Description |
|---|---|
long |
maxDecimalPlaces |
long |
maxFractionalPlaces |
double |
maxValue |
String |
message |
long |
minDecimalPlaces |
double |
minValue |
public abstract String message
Copyright © 2015 Contargo GmbH & Co. KG. All rights reserved.