|
|
|
|
|
by dreadnip
270 days ago
|
|
How can you ever trust validation on the client side though? The user can just mess with it and submit anything they want anyway. Why not validate on the server and return a response or error as HTML? I’m not trying to argue in bad faith here. I know client side validation is necessary in some cases, but IMO it’s only an augmentation for UX purposes on top of server side validation. |
|
If your form has files you'd want to at least check it before sending data unnecessarily to the server.
Also it's always better to have a tighter feedback loop. That is really the main reason why there's validation on the frontend and backend, not just the latter.