I have a login and signup forms i handle validation with JS like showing user messages if email isnt in the right form also minimum characters number etc , the question is as everyone says we must add a server side validation to stay safe from the case user changed or disabled JS in browser , but does that means i dont need and its impossible to show this errors to client side in case he disabled JS cause its disabled ? in general do you write some logic code for that kind of simple form validation errors to user , or this validation errors are only important for developer? if user disabled JS i think react app wont work either so that doesnt make sense and thats what i see
2 Answers
The Server validations are just there to make sure that you are safe that basically means you should not rely on the front-end validations at all. However, you can validate the request with Clientside/JS as well so you won't need an extra call to API to validate the inputs.
In-case of disabled Javascript, you may ask the user to enable or otherwise, you will not be notified of any error.
<noscript>
<span style="color:red">JavaScript is not enabled!</span>
</noscript>
Comments
Server-side validation is must-have. It must be implemented always as it's only guaranteed it cannot be skipped.
Client-side validation is just for user's comfort, he doesn't need to send a request as basic mistakes can be catch during inputting data. Remember that it can be skipped easily within a common browser, so you cannot rely on its safety.
Always best solution is combining both: client-side for comfort and server-side for security.

<noscript>element to advise them they need it is the best recourse. As for showing errors, that's certainly a must or how would they know what to fix?