As i explained in my previous post about validating a web form i thought to explain this post in a little more detail. The form validation is very important otherwise form will start sending empty forms to your email address or to your database. JavaScript do the client side form validation but other programming languages server side scripting languages validate form not to send garbage data to server. So both validations are important because if user have not enabled javaScript in their browser then validation will not work and still empty forms will start getting submitted.
There is one more threat of using client side validation javaScript that if user knows html/javaScript they easily can make your forms send data without any validation and can put them in loops to send unlimited forms to your server or Email. This is the bad side of javaScript validation only. So i recommend with client side validation dont forget server side validation.
But on other hand validation with javaScript is very important that reduce the load on our server to check and send back the result to recheck. Because mostly people use javaScript enabled in their browser so our javaScript validation will work about 99% and will stop users to send wrong data to our server for validation. That reduce our server CPU usage, and the bandwidth also that reduce server efforts to make our website always faster for all aspects.
These are some good programming practices we have to follow so our work is reliable and easy for everyone. I will explain later about server side validation with PHP.