Postel’s Law (robustness principle): accept varied input generously from users, normalize internally, return predictable structured output — reduce needless syntax pedantry.
Parse, don’t nag
Phone numbers, dates, and card spacing should survive messy typing. Strip spaces, infer locale where safe, show the normalized preview.
Be strict where stakes are high
Legal names, tax IDs, or irreversible sends still need validation — pair forgiveness with confirmation and editable previews.
APIs and integrations
When your product consumes messy partner data, isolate normalization in one layer instead of leaking quirks into UI copy.
Practices
- Accept +1 (555) 555-5555 and 5555555555.
- Show parsed email domains and address suggestions after blur.
Common pitfalls
- Rejecting paste with invisible formatting characters only.
- Mystery errors without showing the normalized value attempted.