Hacker News new | ask | show | jobs
by londons_explore 3390 days ago
I prefer sites not to validate fields they have no need for programmatic use of.

Every validation has a few users who don't pass. Names longer than expected, people with no surname, phone numbers with an "extension" code, addresses with no house number, email addresses xyz+2@8.8.8.8, etc.

Validate only what you need to to make your service work, and when you do, use an official validation library rather than baking your own.