Client-side validation is always less work and easier to maintain because it requires one less integration point between backend and frontend, and no spinner, so no timing issues. Always use client-side validation any time you can. Occasionally it seems easier to check things on the server, but without exception, I have always found this impression to be wrong, when looked back at in retrospect. There are some times you need server-side validation, such as for uniqueness constraint checks in the database, or any kind of database-based check. (Because the browser doesn't have access to the entire database, nor should it.)
Created
November 8, 2022 17:17
-
-
Save mikermcneil/01d7041043034afb5420971a73426630 to your computer and use it in GitHub Desktop.
Should I use client-side validation any time I possibly can? When is it worth it to use server-side, instead of client-side validation?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment