UNPKG

id-doc-validator

Version:

A validator for different types of personal ID for multiple countries.

15 lines (10 loc) 285 B
const { testStringAgainstRegex } = require("../utils"); const validateVatCZ = (vat) => { const vatPattern = /^CZ\d{8,10}$/; if (!testStringAgainstRegex(vat, vatPattern)) return false; // TODO: validate the check digit return true; }; module.exports = { validateVatCZ, };