@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(Digits.List.class)
@Documented
@Constraint(validatedBy={})
public @interface Digits
The annotated element must be a number within accepted range.
Supported types are:
BigDecimal
BigInteger
CharSequence
byte
,short
,int
,long
, and their respective wrapper types
null
elements are considered valid.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Defines severalDigits
annotations on the same element. -
Required Element Summary
-
Optional Element Summary
-
Element Details
-
message
String message- Default:
"{jakarta.validation.constraints.Digits.message}"
-
groups
Class<?>[] groups- Default:
{}
-
payload
-
integer
int integer- Returns:
- maximum number of integral digits accepted for this number
-
fraction
int fraction- Returns:
- maximum number of fractional digits accepted for this number
-