FAILURE MAP
← Case archive

FA-95904 / Postal address normalization / Member archive

Five-or-nine digit postal code: space-separated plus-four is rejected · case 04

"12029 4101" returns None although a space separator is allowed.

Member previewVariant 4 · 3 implementations · 12 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
space-separated plus-fournull"45069-7104"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 ↗