Postel's Law
Be liberal in what you accept, and conservative in what you send.
Read the original on lawsofux.com →
The scenario: the phone-number field on the Fernvale Goods checkout. Both versions below are live — try them. Each is pre-filled with a perfectly normal way people write their number: “+30 210 555 0199”. Click away from the field (or press the button) and watch how each version treats it.
Delivery details
Step 2 of 3 — we'll text you when the courier is nearby.
Delivery details
Step 2 of 3 — we'll text you when the courier is nearby.
🔍 What changed
- Liberal in: the field now accepts every common way people write a phone number — spaces, dashes, brackets, “+30”.
- Conservative out: whatever comes in, one canonical E.164-style number (+302105550199) is what gets stored and sent to the SMS gateway.
- The harsh red “INVALID FORMAT” error became a calm confirmation of what we understood.
- Normalizing punctuation is one line of code for us; retyping a number to satisfy a regex was friction for every customer.
💼 Explaining it to stakeholders
“Every ‘invalid format’ error at checkout is us rejecting a paying customer over punctuation. People copy their phone number from their contacts card, with spaces and a country code — that's not bad data, it's normal data. By accepting any reasonable format and normalizing it ourselves, we keep our systems receiving one clean, consistent value while removing a proven abandonment point from the highest-value page we own.”