Forms have to be validated in order to safely execute them and handle the values submitted. The best way of safely sanitize forms is by combining three technologies, that are: filter the input fields with HTML 5 input restrictions, use JavaScript coding and Events to do further analyses as the fields are being filled up, and finally use a PHP validation software that will be executed upon a server receives the data. The adventage of HTML 5 and JavaScript is that they are stored on a client's browser and execute promptly, while the PHP has to wait for the server to read the values (date travel across Internet).

Overal a form validation is an important step in avoiding any kind of errors in the input data of the form, whether benign or malign. For example, if an email address is asked in a form than a text field's value shoud pass a "is it a valid e-mail address" check. A warning sign can be delivered during the form process and messages can be multiple. 

 

›› go to examples ››