The rules for the input fields are as follows: the username must be of at least three characters, the email should be in a proper format i.e. [email protected], the password must be 6 characters and not less than that.
The next slot is for confirming the password wherein the user must input the same password as the last field. Then the user can tap on the submit button to save the details entered on the console page which can be accessed through the chrome dev tool of chrome browser.
If the fields are correctly entered as per the rules, then the input field will prompt green color and the details will be saved. On the other hand, if the details are wrong as per the rules, then the red color will be prompted along with the rule. Then the user is expected to fill in the input fields with respect to the rule prompted in red.
This is how the form validator works.
Submitted by Abhishek Upmanyu (abhishekupmanyu23)
Download packets of source code on Coders Packet