0

Help me solve my form validation program error

1.When I first enter an error then again full name in my form validation program, message is still there. How can I remove it once true message is passed? 2. How to stop "email" validation before other boxes? Here is program: https://code.sololearn.com/W1QCNwuF6jlp/?ref=app

10th Apr 2022, 12:08 PM
Logician S
Logician S - avatar
1 Answer
+ 2
Logician S To remove error message you can put empty string in else part if (a == "") { document.getElementById("name2").innerHTML = ''error"; return false; } //This will remove error message document.getElementById("name2").innerHTML = ''"; 2 - remove required attribute from email field because it an attribute of html 4 form validation which works before JavaScript validation. You can verify email manually
10th Apr 2022, 12:28 PM
A͢J
A͢J - avatar