4 ms·
The form element type is perfectly enough for frontend validation. You should do the rest on the backend anyway.
by pmlnr 10y ago
The form element type is perfectly enough for frontend validation.
You should do the rest on the backend anyway.
- ccozan 10y agoI don't get where the popup ( when you don't match the pattern) in the form example is coming. Is it from the browser? Can someone explain?
- Semiapies 10y agoIt's from the browser, using the form input attributes they describe.
- pveierland 10y agoWhen submitting a form with an incorrect pattern in Firefox, the validation behavior highlights the relevant textbox in red for a second, and removes its contents. This default behavior gives a very poor user experience.
- kqr 10y agoAnd if we spent half the time we collectively spend making JavaScript validation programs on making the Firefox validation behaviour better, it'd not be this way. Who goes first? Not me!
- jasonlotito 10y agoPerfect enough? Hardly. Errors aren't shown until you submit, giving you no opportunity to fix the mistake while you are there. It also only shows one error at a time. So if you have multiple errors, you fix one, everything is fine, and you don't see an error until you submit again. > You should do the rest on the backend anyway Well yes, you should validate on the backend, but you shouldn't wait to only validate on the backend. This works well enough for getting things done quickly, but it's hardly a good UX, and a far cry from "perfect enough," whatever that means.
- Semiapies 10y agoYeah, from the responses, I'm definitely seeing a gulf between "people who've read some random stuff on HN about web design" and "people who actually do web design".