@MaxDigits annotation

back to index

Action

Requests that a numeric value has at least the number of significant digits specified by this annotation

Javadoc Ref :  Javadoc reference@MinDigits

 Input Types 1
Number
 Output Types
Number
   

1Automatic conversion will take place if the provided input does not match any of the input classes, as described in the conversions part of the manual.

Arguments

value

Minimum number of digits

message

Literal message to use if validation fails.

errorCode
Error code to use if validation fails.
messageKey
Message key to use if validation fails.

 

Example

@MinDigits(5)
private int intField;

@MinDigits(5)
private BigDecimal bdField;

@MinDigits(5)
private String stringField;