A numeric string without punctuation, including the check digit at the configured position. E.g. 7891000315507 (EAN-13).
weightList *
Weights applied to each digit in the weighted sum, one per data digit. E.g. EAN-13 uses [1,3,1,3,1,3,1,3,1,3,1,3]. The list length must equal numDigitsForCheckdigitCalculation.
modulusNumber *
The modulus divisor. The check digit is normally (modulus − remainder) % modulus. EAN-13 uses 10; CNPJ uses 11.
checkDigitIndex *
Position of the check digit in the string, counted from 0 at the left. In a 13-digit code with the check digit last, enter 12.
calculateChecksumRightToLeft *
Direction in which the weights are applied. true — right to left (payment slips, CNPJ). false — left to right (EAN, UPC).
numDigitsForCheckdigitCalculation *
How many digits enter the sum, excluding the check digit itself. EAN-13 has 12 data digits.
swapModulusForZeroRemainder
When the remainder is zero, uses modulusNumber itself as the check digit instead of 0. Some standards (CNPJ among them) follow this rule.
checksumCalculationType
STANDARD — weighted sum modulo N (default). TFN — the Australian Tax File Number variant, with its own logic.
numericAlgorithm
Algorithm that shuffles the digits which are not the check digit. Omitted, it uses the built-in numeric Character Mapping.
alphaNumericAlgorithm
Algorithm used when the input contains letters as well as digits. Without it, alphanumeric input may fail depending on characterHandling.
fallbackAlgorithm
Algorithm invoked for invalid input when invalidInputHandling = FALLBACK_MASK. It receives the whole original value.
preserveRegex
A regex identifying parts to preserve — fixed prefixes, country codes. Matching stretches stay intact and only the remainder is masked.
inputHandlingConfig
Block controlling how the input is handled before masking.
↳ characterHandling
NUMERIC_ONLY — accepts only 0-9. STANDARD — letters use their ASCII value. ASCII_VALUE_MINUS_48 — letters use (ASCII − 48), used by standards that interleave letters and digits.
↳ invalidInputHandling
ERROR — raises an exception (default). FALLBACK_MASK — delegates to fallbackAlgorithm.
↳ shortInputHandling
Input shorter than expected: FALLBACK delegates, PAD_LEFT / PAD_RIGHT pad with padCharacter.
↳ padCharacter
Padding character for short input. Usually 0.
↳ trimWhitespace
Strips whitespace from both ends before processing. Necessary for padded CHAR(n) columns.