org.hibernate.validator.constraints

## Annotation Type ModCheck

- Deprecated.
  As of release 5.1.0, replaced by `Mod10Check` and `Mod11Check`

      @Documented
      @Deprecated
      @Constraint(validatedBy={})
      @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
      @Retention(value=RUNTIME)
      public @interface ModCheck

  Modulo check constraint.

  Allows to validate that a series of digits pass the mod 10 or mod 11 checksum algorithm.

  The supported type is `CharSequence`. `null` is considered valid.

  Author:
    George Gastaldi, Hardy Ferentschik

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `ModCheck.ModType` | `modType` Deprecated.
    `int` | `multiplier` Deprecated.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `int` | `checkDigitPosition` Deprecated.
    `int` | `endIndex` Deprecated.
    `Class<?>[]` | `groups` Deprecated.
    `boolean` | `ignoreNonDigitCharacters` Deprecated.
    `String` | `message` Deprecated.
    `Class<? extends Payload>[]` | `payload` Deprecated.
    `int` | `startIndex` Deprecated.

- - ### Element Detail

    - #### modType

          public abstract ModCheck.ModType modType

      Deprecated.
      Returns:
        The modulus algorithm to be used

    - #### multiplier

          public abstract int multiplier

      Deprecated.
      Returns:
        The multiplier to be used by the chosen mod algorithm

    - #### message

          public abstract String message

      Deprecated.
      Default:
        "{org.hibernate.validator.constraints.ModCheck.message}"

    - #### groups

          public abstract Class<?>[] groups

      Deprecated.
      Default:
        {}

    - #### payload

          public abstract Class<? extends Payload>[] payload

      Deprecated.
      Default:
        {}

    - #### startIndex

          public abstract int startIndex

      Deprecated.
      Returns:
        the start index (inclusive) for calculating the checksum. If not specified 0 is assumed.
      Default:
        0

    - #### endIndex

          public abstract int endIndex

      Deprecated.
      Returns:
        the end index (exclusive) for calculating the checksum. If not specified the whole value is considered
      Default:
        2147483647

    - #### checkDigitPosition

          public abstract int checkDigitPosition

      Deprecated.
      Returns:
        The position of the check digit in input. Per default it is assumes that the check digit is part of the specified range. If set, the digit at the specified position is used as check digit. If set it the following holds true: `checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex`.
      Default:
        -1

    - #### ignoreNonDigitCharacters

          public abstract boolean ignoreNonDigitCharacters

      Deprecated.
      Returns:
        Returns `true` if non digit characters should be ignored, `false` if a non digit character results in a validation error. `startIndex` and `endIndex` are always only referring to digit characters.
      Default:
        true

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved