Format and field rules
Many northeastern ZIP Codes begin with zero. Numeric types can remove those zeros during parsing or export.
Use VARCHAR or an equivalent text type, set spreadsheet columns to text before CSV import, and validate the pattern instead of a numeric range in forms.
Recommended test cases
Cover normal input, boundary input, and deliberately invalid input as separate cases.
- Save and read back 00501
- Confirm the value remains five digits after CSV export
- Confirm the JSON API sends postal_code as a string
Scope
This guide explains development-test formatting. It does not provide a delivery, identity, or payment verification result.
Authorship and review
- Written by
- Random Address Generator Editorial Team
- Reviewed by
- Data and Format Review Team
- Latest substantive update
- Reviewed the field rules, test examples, and scope for “Why ZIP Code Leading Zeros Disappear.”