Leading-Zero ZIP Code Loss Warner
Flag original five-digit or ZIP+4-shaped cells beginning with zero as susceptible to numeric-import loss; this is a spelling warning rather than postal-code assignment validation.
Description
ZIP codes are identifiers rather than quantities.
ZIP codes are identifiers rather than quantities. When a leading-zero ZIP code is converted to a number, its fixed-width spelling can be lost; keeping the original text avoids that problem.1
Flag original five-digit or ZIP+4-shaped cells beginning with zero as susceptible to numeric-import loss; this is a spelling warning rather than postal-code assignment validation.
When to use Leading-Zero ZIP Code Loss Warner
Use this tool to flag original five-digit or ZIP+4-shaped cells beginning with zero as susceptible to numeric-import loss; this is a spelling warning rather than postal-code assignment validation.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use Leading-Zero ZIP Code Loss Warner and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter values using the field table and calculation rules, then run the tool.
- Read atRiskIndices. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| values | Values | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
Provide candidate cell strings. The tool trims boundary whitespace for inspection and flags zero-based positions matching exactly five digits beginning with zero, optionally followed by a hyphen and four digits. Other strings are left unflagged and the original cells are not rewritten.
warned token matches 0dddd or 0dddd-dddd using ASCII digits Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| atRiskIndices | At risk indices | list of integer; minimum: 0 |
{
"input": {
"values": [
"02108",
"10001",
"00501-1234"
]
},
"output": {
"atRiskIndices": [
0,
2
]
}
} Limitations and assumptions
This recognizes a narrow loss-risk pattern, not all postal formats or actual assigned US ZIP codes. It cannot detect or restore zeros that have already been removed. An unflagged result does not certify that numeric conversion is appropriate for an identifier.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Column Type Inference From Sample: Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings. For a complementary task, use ID Column Uniqueness Check: Check exact string ID uniqueness in a supplied column, treating empty strings and leading zeros literally; report indices of occurrences after each first occurrence.
References
-
Leading-Zero ZIP Code Loss Warner — tool.io
Similar or alternative tools
- Column Type Inference From Sample
Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings.
- ID Column Uniqueness Check
Check exact string ID uniqueness in a supplied column, treating empty strings and leading zeros literally; report indices of occurrences after each first occurrence.