Package jakarta.validation.constraints
Annotation Interface Digits
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Documented
@Constraint(validatedBy={})
public @interface Digits
The annotated element must be a number within accepted range.
Supported types are:
BigDecimalBigIntegerCharSequencebyte,short,int,long, and their respective wrapper types
null elements are considered valid.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines severalDigitsannotations on the same element. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
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
-
-