nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a French (FR) identity, business or VAT document.

      Parameters

      • code: "FR_NIR" | "FR_SIREN" | "FR_SIRET" | "FR_TVA" | ShortCode

        Document type, either fully-qualified (FR_NIR, FR_SIREN, FR_SIRET, FR_TVA) or short (NIR, SIREN, SIRET, TVA).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes FR-specific validation rules.

      import { validate } from "nationid/fr";
      validate("FR_NIR", "1 84 12 76 451 089 46"); // true
      validate("SIREN", "732 829 320");