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
- Enter value, length. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Text; maximum UTF-16 length 8192. |
| length | Length | Required. Safe integer; minimum 1; maximum 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| matches | Whether the supplied values match under the particular stated rule. | Required. Boolean. |
| missing | Missing | Required. Safe integer. |
{
"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
Similar or alternative tools
- GS1 AI Fixed Field Leading Zero Preserver
Preserve a supplied field verbatim while checking numeric fixed width and counting its leading zeros.
- GS1 AI Variable Length Separator Flag
Set separatorRequired when fixedLength is false and finalField is false.