nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate a Finnish (FI) identity, business or VAT document.

      Parameters

      • code: "FI_HETU" | "FI_YTUNNUS" | "FI_VAT" | ShortCode

        Document type, either fully-qualified (FI_HETU, FI_YTUNNUS, FI_VAT) or short (HETU, YTUNNUS, Y, VAT, ALV).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes FI-specific validation rules.

      import { validate } from "nationid/fi";
      validate("FI_HETU", "131052-308T"); // true
      validate("YTUNNUS", "1572860-0");