nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a Salvadoran (SV) identity or tax document.

      Parameters

      • code: "SV_DUI" | "SV_NIT" | "SV_PASAPORTE" | ShortCode

        Document type, either fully-qualified (SV_DUI, SV_NIT) or short (DUI, NIT, PASAPORTE).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes SV-specific validation rules.

      import { validate } from "nationid/sv";
      validate("SV_DUI", "01234567-8");
      validate("NIT", "0614-010190-101-1");