nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a Norwegian (NO) identity or tax document.

      Parameters

      • code: "NO_FNR" | "NO_DNR" | "NO_ORGNR" | "NO_MVA" | ShortCode

        Document type, either fully-qualified (NO_FNR, NO_DNR, NO_ORGNR, NO_MVA) or short (FNR, FODSELSNUMMER, DNR, ORGNR, ORG, MVA, VAT).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes NO-specific validation rules.

      import { validate } from "nationid/no";
      validate("NO_FNR", "01012055555");
      validate("ORGNR", "123456785");