UNPKG

degachejs

Version:

A Tunisian utility library for working with CIN, phone numbers, addresses, and more

17 lines (16 loc) 494 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateTaxID = void 0; /** * Regular expression for tax ID validation */ const TAX_ID_REGEX = /^\d{7}[A-Z]\/[A-Z]\/[A-Z]\/\d{3}$/; /** * Validates a Tunisian company tax ID (Matricule Fiscal) * @param taxId - The tax ID to validate * @returns boolean indicating if the tax ID is valid */ const validateTaxID = (taxId) => { return TAX_ID_REGEX.test(taxId); }; exports.validateTaxID = validateTaxID;