nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a Guatemalan (GT) identity or tax document.

      Parameters

      • code: "GT_DPI" | "GT_NIT" | "GT_PASAPORTE" | ShortCode

        Document type, either fully-qualified (GT_DPI) or short (DPI, CUI, NIT, PASAPORTE).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes GT-specific validation rules.

      import { validate } from "nationid/gt";
      validate("GT_DPI", "1234 56789 0101");
      validate("NIT", "1234567-8");