java.lang.Object
org.hibernate.validator.internal.constraintvalidators.hv.ModCheckBase
org.hibernate.validator.internal.constraintvalidators.hv.ModCheckValidator
All Implemented Interfaces:
ConstraintValidator<ModCheck,CharSequence>

@Deprecated public class ModCheckValidator extends ModCheckBase implements ConstraintValidator<ModCheck,CharSequence>
Deprecated.
As of release 5.1.0, replaced by Mod10CheckValidator and Mod11CheckValidator
Mod check validator for MOD10 and MOD11 algorithms http://en.wikipedia.org/wiki/Luhn_algorithm http://en.wikipedia.org/wiki/Check_digit
Author:
George Gastaldi, Hardy Ferentschik
  • Constructor Details

    • ModCheckValidator

      public ModCheckValidator()
      Deprecated.
  • Method Details

    • initialize

      public void initialize(ModCheck constraintAnnotation)
      Deprecated.
      Specified by:
      initialize in interface ConstraintValidator<ModCheck,CharSequence>
    • isCheckDigitValid

      public boolean isCheckDigitValid(List<Integer> digits, char checkDigit)
      Deprecated.
      Check if the input passes the Mod10 (Luhn algorithm implementation only) or Mod11 test
      Specified by:
      isCheckDigitValid in class ModCheckBase
      Parameters:
      digits - the digits over which to calculate the Mod10 or Mod11 checksum
      checkDigit - the check digit
      Returns:
      true if the mod 10/11 result matches the check digit, false otherwise