Introduction
Forms and pages are the only part of your web application that the end-user uses directly. It is, therefore, the responsibility of a web developer to make forms that are easy to use, easy to navigate, and interactive. Moreover, attackers can try to damage your application by trying to input malicious data through your forms.
This chapter deals with forms and form validations like searching for data in a form both on the browser and the server side. Though validation can be done on the browser with the help of jQuery, validating data on the server side is more important. If JavaScript is disabled on the browser, then the client-side validation will not work. Validation on the client side makes your application user-friendly and less error prone. You will learn how to validate forms for different types of data such as empty fields, numbers, e-mail or web addresses, and so on later in this chapter.
Note
Validation on the server side is a must and the client-side validation should...