Checksum rules LIVR 2.5
Checksum rules check numbers with a check digit. The string form of the value is checked as it is: no spaces, dashes or lowercase letters are removed. Use modifiers before, for example [{ remove: ' -' }, 'to_uc', 'iban']. The output is the string form. A boolean gives the error code of the rule, and an object or a list gives FORMAT_ERROR.
These rules were added in LIVR 2.5.
luhn2.5Checks that the value is at least 2 ASCII digits and that its Luhn mod 10 checksum is 0.'luhn'WRONG_CHECKSUMcredit_card2.5Checks that the value is a payment card number: 12–19 ASCII digits (ISO/IEC 7812) with a valid Luhn checksum.'credit_card'WRONG_CREDIT_CARD_NUMBERiban2.5Checks that the value is an IBAN (ISO 13616) with valid check digits.'iban'WRONG_IBAN