UNPKG

polish-validators

Version:

A set of validator functions that check common polish numbers.

21 lines (20 loc) 1.04 kB
/** * Validates a Polish ID card number. The function verifies that the number matches * a specific pattern (`AAA XXXXXX` where each `A` is any letter a-z and each `X` is any digit) * and validates the control digit based on a checksum calculation. Any dashes or * whitespace are ignored. * * @param {string} number - The ID card number as a string. * @returns {boolean} `true` if the ID card number is valid; `false` otherwise. */ export declare function isIdCardNumberValid(number: string): boolean; /** * Validates a Polish ID card number. The function verifies that the number matches * a specific pattern (`AAA XXXXXX` where each `A` is any letter a-z and each `X` is any digit) * and validates the control digit based on a checksum calculation. Any dashes or * whitespace are ignored. * * @param {string} number - The ID card number as a string. * @returns {boolean} `true` if the ID card number is invalid; `false` otherwise. */ export declare const isIdCardNumberInvalid: (number: string) => boolean;