I am currently doing some research regarding validation (e.g. user-forms).
It is pretty obvious that validation absolutely has to be done on the backend to prevent "bad intentions" or malicious input etc.
Validation on the front end would additionally increase user friendliness as it is usually faster and we save a server roundtrip.
My question is the following: Is it good practice to do the validation e.g. only on the server-side and return localized error messages that are then shown by the front end?
Or is it an absolute no-go and validation should always happen on both sides?
And even if back- and frontend validation is done, and a failure happens on the backend due to an unexpected missing frontend validation, should the response contain a localized information to be shown on the frontend? Or would you just show a general "Something went wrong" message?
Somehow I have a bad feeling about localized error messages from an API.