I have a question about forms validation in JS. I know that the most part of the inputs of an app must be validated on the server side, but if you also do it in the client side, you will be avoiding unnecesary requests to the server.
In the other hand, the logic of your data validation will be exposed in your client code (in my opinion there will be more chance to bypass the app security), and also, there will be code repetition (in the server and client) and a double check if all is correct, which is not the best performance.
Is there any standard? Until now, I have been doing all this stuff in the backend, but I am a little curious about this.
I would really appreciate the suggestion (list of pros and cons, if necessary) of an experienced programmer.
Thank you.