Skip to content

Main content

GS1 AI Fixed Length Padding Check Tool

Compute gs1 ai fixed length padding check from explicit bounded inputs.

Loading tool…

Description

Check a digit field's supplied fixed length and report any missing character count without padding it.

Identifier validation can involve several distinct questions: whether text has the expected shape, whether a checksum is consistent, and whether an authority actually assigned the identifier. Formatting and field extraction address narrower questions. Each result must be read according to the particular property the tool checks.

Check a digit field's supplied fixed length and report any missing character count without padding it.

When to use this tool

Use GS1 AI Fixed Length Padding Check when you need the particular shape, formatting, field, or checksum property as one explicit stage in an identifier workflow.

How to use the tool and how it works

  1. Enter value, length. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read matches, missing. Inspect matches before interpreting the associated values.

Require length from one through 128 and a digit-only value, allowing empty text. Return matches for exact length and missing=max(0,length-value.length).1

Input fieldMeaning and unitsAccepted input
valueValueRequired. Text; maximum UTF-16 length 8192.
lengthLengthRequired. Safe integer; minimum 1; maximum 128.
Output fieldInterpretationReturned shape
matchesWhether the supplied values match under the particular stated rule.Required. Boolean.
missingMissingRequired. Safe integer.
json
{
  "input": {
    "value": "123",
    "length": 5
  },
  "output": {
    "matches": false,
    "missing": 2
  }
}

Limitations and assumptions

  • An overlong value has matches false but missing zero. No padding is added and no GS1 application identifier, semantic field rule, or checksum is validated.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.

Alternative or Complementary methods

Use a complete format and checksum validator when required, then consult the issuing registry or verification process for assignment and identity. Preserve meaningful leading zeros as text.

References

  1. Calculation and input contract: validate/gs1-ai-fixed-length-padding-check — tool.io

Similar or alternative tools