Docs · Validators

gln validator

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

Reference

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

How it runs

Implementation

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

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

Config

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.

template.yaml
fields:
  - column: gln
    type: string
    validators:
      - type: gln

Watch out

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.

Catalogue

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

Validators add no AI cost — they are pure functions. Every map bills a small flat per-map fee from your prepaid token wallet ($10 minimum, shared across our suite); only columns that reach the metered LLM layer, plus any-to-any convert and reshape, bill real AI tokens. See pricing →

Ready when you are

Validate every row — before it lands.

Attach checksum-strict validators to any field, and gate risky commits with the requires_hitl flag. One key runs the whole cascade.

Prepaid token wallet · schema-only data-minimization mode
gln validator — AdaptivMapr