nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate an Italian (IT) identity or tax document.

      Parameters

      • code: "IT_CF" | "IT_PIVA" | ShortCode

        Document type, either fully-qualified (IT_CF, IT_PIVA) or short (CF, CODICE_FISCALE, PIVA, P_IVA, VAT).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes IT-specific validation rules.

      import { validate } from "nationid/it";
      validate("IT_CF", "RSSMRA80A01H501U");
      validate("PIVA", "12345670017");