Class REGONValidator
java.lang.Object
org.hibernate.validator.internal.constraintvalidators.hv.ModCheckBase
org.hibernate.validator.internal.constraintvalidators.hv.pl.PolishNumberValidator<REGON>
org.hibernate.validator.internal.constraintvalidators.hv.pl.REGONValidator
- All Implemented Interfaces:
ConstraintValidator<REGON,
CharSequence>
Validator for
REGON
. Validates both 9 and 14 digits REGON numbers.- Author:
- Marko Bekhta
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int[]
getWeights
(List<Integer> digits) void
initialize
(REGON constraintAnnotation) Methods inherited from class org.hibernate.validator.internal.constraintvalidators.hv.pl.PolishNumberValidator
isCheckDigitValid
Methods inherited from class org.hibernate.validator.internal.constraintvalidators.hv.ModCheckBase
extractDigit, initialize, isValid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.validation.ConstraintValidator
isValid
-
Constructor Details
-
REGONValidator
public REGONValidator()
-
-
Method Details
-
initialize
-
getWeights
- Specified by:
getWeights
in classPolishNumberValidator<REGON>
- Parameters:
digits
- a list of digits to be verified. They are used to determine a size of REGON number - is it 9 or 14 digit number- Returns:
- an array of weights to be used to calculate a checksum
-