by gdwatson · 2y ago · 0 comments
I used to think it doubled your workload to do both, but if you are using JS-free client-side validation, I think that the server can just return an HTTP error guilt-free for any invalid input that the browser will catch. It’s a pretty good compromise for format validation.
Indeed the most pleasant UX is to set an additional validation logic on the client side and I don’t think this should the go-to solution.
No, you can handle that on the server too, easily, since you can fill the form with the last known state upon page loading.