If programmer created a file it should be properly validate.Using form validation we can stop the processing of incorrect input.
Because when user enter a invalid input than it may be our form will processed and generated wrong input. We can validate our form on two sides.
In Server Side is used for validating passwords etc.
Client Side validation is much faster than Server Side validation.
Some general value that you have to validate when you create form.
5.strip HTML tags