In this tutorial, we are going to validate the name and password. The name can’t be empty and password can’t be less than 7 characters long.
Here, we are validating the form on form submit. The user will not be forwarded to the next page until given values are correct.