4 ms·
probably they mean why people started using JS in form validation, and not JS altogether, although agree that isn't the reason either.
by bryanrasmussen 2y ago
probably they mean why people started using JS in form validation, and not JS altogether, although agree that isn't the reason either.
- sholladay 2y agoCorrect, I meant that client-side validation driven by JS became popular because of UX issues when using pure HTML. There have always been plenty of other reasons to use JS with forms besides validation. But it’s notable because forms and form validation are such common building blocks that if people feel the need to use JS there, it kind of infects everything else around it. IMO, being able to build high quality form experiences without JS is critical to reducing bloat on the web.
- Macha 2y agoJS form validation quite significantly predates HTML form validation. The alternative was server side form validation, for the longest time. HTML form validation was meant to standardise and reduce the need for JS validation, but for UX reasons it hasn't really managed that. And that you'll need JS anyway if you're doing validation specific to your business logic that doesn't fit into the set of rules HTML validation has.