Hacker News new | ask | show | jobs
by chii 599 days ago
I think form validation should remain an app implemented part of a web form, rather than natively built into the browser.

The majority of the work in form validation is not in the validation of the data, but in the UX and interaction, display and update of state. There's no generic way to handle it, as it's very dependent on the app itself.

Keeping the browser smaller and cleaner, with less logic seems to be a better idea.

2 comments

> Keeping the browser smaller and cleaner, with less logic seems to be a better idea

That idea died sometime around 15 years ago.

Chromium can probably be best-described as a kind-of user-mode OS at this point.

Checking if a string is a email (or at least looks like one), if it's a number, etc. is such a cheap processing, that setting up and tearing down a connection to the server to process it is a waste of resources. Client side validation has its uses, it's more responsive. The problem is that we want all these custom behaviors when it's actually some rudimentary data input validation.