UNPKG

polish-validators

Version:

A set of validator functions that check common polish numbers.

19 lines (18 loc) 949 B
/** * Validates a REGON (Polish National Business Registry Number) string. * The function checks for 9- or 14-digit formats and calculates a checksum according to * REGON requirements. Any dashes or whitespace are ignored. * * @param {string} regon - The REGON number as a string, which may include dashes or whitespace. * @returns {boolean} `true` if the REGON is valid; `false` otherwise. */ export declare function isRegonValid(regon: string): boolean; /** * Validates a REGON (Polish National Business Registry Number) string. * The function checks for 9- or 14-digit formats and calculates a checksum according to * REGON requirements. Any dashes or whitespace are ignored. * * @param {string} regon - The REGON number as a string, which may include dashes or whitespace. * @returns {boolean} `true` if the REGON is invalid; `false` otherwise. */ export declare const isRegonInvalid: (regon: string) => boolean;