FA-95903 / Postal address normalization / Member archive
Five-or-nine digit postal code: space-separated plus-four is rejected · case 03
"12029 4101" returns None although a space separator is allowed.
Case contract
Input a string or an integer. Integers are zero-padded to 5 digits when <= 99999, else to 9. Strings are stripped; a 10-character string with "-" or a space at index 5 loses that separator. Valid results are exactly 5 or 9 ASCII digits; 9 digits render "DDDDD-DDDD" unless the last four are "0000", which renders the 5-digit form. Anything else returns None.
Why this case matters
Postal codes arrive from spreadsheets, forms and legacy files; losing leading zeros or accepting malformed codes misroutes mail and breaks deduplication.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| space-separated plus-four | null | "34059-6103" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗