Required field will check whether the field is filled or not in the proper way.
Most of cases we will use the * symbol for required field.
Input Validation is the outer defensive perimeter for your web application.
This perimeter protects the core business logic, processing and output generation.
Validation means check the input submitted by the user.
In suggesting that users are untrusted, we imply that everything else is trusted. Users are just the most obvious untrusted source of input since they are known strangers over which we have no control.
Each of these allies have their own perimeters which may or may not trust ours. As noted in the Introduction, we trust nothing and nobody.
The common phrase you will have seen in PHP is to never trust “user input”.
As you have seen in the previous tutorial, the process of capturing and displaying the submitted form data is quite simple.
In this tutorial you will learn how to implement a simple contact form on your website that allows the user to send their comment and feedback through email.