What is Form validation?
Form validation is the process of ensuring that data collected through an HTML Form provided by a user is correct and in the correct format.
When you collect data through an HTML Form provided by a user, obviously you need to verify programmatically whether the information is correct, and this is called form validation.
Where and when to implement form validation?
1. Client-side validation
In the Client-side validation, we perform the form validation on a web browser before the form data is sent to a web server.
2. Server-side validation
In the Server-side validation, we perform the form validation on a server after receiving the form data from a client.
Want to know: What is client and server?
Which one should you use?
Server-side form validation should be used by all developers for safety reasons and to collect correct data.
But, Client-side form validation is also good it will reduce the server load and increase the application performance.
You can Implement both.