DocsValidators

gln validator

GS1 Global Location Number — 13 digits with GTIN-style checksum.

Format

Matches `/^\d{13}$/`, then delegates to the GTIN checksum (mod-10 weighted 3,1,3,1…) for the trailing digit.

Examples

  • 7601001000001 (sample CH GLN)
  • 4012345000009 (sample DE GLN)
  • 0614141999996

Implementation

Faithful summary of lib/validators.ts. Validators are pure functions and run identically in the worker, the Workbench, and the MCP server.

function validGln(value) {
  if (!/^\d{13}$/.test(value)) return fail('gln_format', 'expected 13 digits')
  return validGtin(value)   // same mod-10 checksum
}

Use in a template

Validators attach to a field on a custom template. The cascade runs them after mapping but before commit; failures surface in the per-row validation report.

fields:
  - column: gln
    type: string
    validators:
      - type: gln

Common gotchas

  • GLN and GTIN-13 share the same checksum. A "valid GLN" might syntactically also be a valid GTIN — the namespaces overlap; only the GS1 prefix tells them apart.
  • No GS1 GEPIR (company prefix) lookup. We cannot tell you who owns a given GLN.
  • Leading zeros are significant. Send as a string.

Related templates

  • Employee rosteremployee_roster_v1

    Names, AHV/GLN, contract type, address.

    Fields: gln

  • Supplier inventorysupplier_inventory_v1

    Supplier catalogue with GTIN/IBAN/GLN.

    Fields: gln

  • Provider directoryprovider_directory_v1

    Providers with NPI/GLN/license metadata.

    Fields: gln

Pricing

Validators run on every committed row

Schema-only mode (headers + ≤3 sample rows) is free and unlimited; full-data commits are metered. See plans →