nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a Polish (PL) identity or tax document.

      Parameters

      • code: "PL_PESEL" | "PL_NIP" | "PL_REGON" | ShortCode

        Document type, either fully-qualified (PL_PESEL, PL_NIP, PL_REGON) or short (PESEL, NIP, REGON).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes PL-specific validation rules.

      import { validate } from "nationid/pl";
      validate("PL_PESEL", "44051401359");
      validate("NIP", "5260250274");