Package org.apache.bval.constraints
Class DigitsValidatorForString
- java.lang.Object
-
- org.apache.bval.constraints.DigitsValidatorForString
-
- All Implemented Interfaces:
jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,String>
public class DigitsValidatorForString extends Object implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,String>
Validates that theString
being validated consists of digits, and matches the pattern defined in the constraint.
-
-
Constructor Summary
Constructors Constructor Description DigitsValidatorForString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFractional()
int
getIntegral()
void
initialize(jakarta.validation.constraints.Digits annotation)
boolean
isValid(String str, jakarta.validation.ConstraintValidatorContext context)
void
setFractional(int fractional)
void
setIntegral(int integral)
-
-
-
Method Detail
-
getIntegral
public int getIntegral()
-
setIntegral
public void setIntegral(int integral)
-
getFractional
public int getFractional()
-
setFractional
public void setFractional(int fractional)
-
initialize
public void initialize(jakarta.validation.constraints.Digits annotation)
- Specified by:
initialize
in interfacejakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,String>
-
-