Which check to use
1 answer
You must use both .
Server side validation is required so that no one can exploit malformed queries and access your data. You have to do server side validation because anyone can make bad requests to your page directly (instead of going through your client scripts)
Client side validation is only about helping innocent users submit correct data in case they make a mistake that would cost a whole trip to the server and reload the page, which would be detected and rendered differently.
+5
source to share