nationid - v2.2.1
    Preparing search index...

    Function validate

    • Validate an Ecuadorian (EC) identity or tax document.

      Parameters

      • code: "EC_CEDULA" | "EC_RUC" | "EC_PASAPORTE" | ShortCode

        Document type, either fully-qualified (EC_CEDULA, EC_RUC, EC_PASAPORTE) or short (CEDULA, RUC, PASAPORTE).

      • input: string

        Raw document string (formatting tolerated).

      Returns boolean

      true if the value passes EC-specific validation rules.

      import { validate } from "nationid/ec";
      validate("EC_CEDULA", "1710034065");
      validate("RUC", "1710034065001");