Skip to content

Commit

Permalink
Merge pull request #1530 from aadhi-i/aadhi/improv
Browse files Browse the repository at this point in the history
fix: on name validation, issue #1390
  • Loading branch information
apu52 authored Oct 25, 2024
2 parents 1dc66ed + 95ba266 commit e4395af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions newLogin.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ <h1 class="title">Start your <br> journey now</h1>
validateForm("register");
});

//Form validation for registration name
document.getElementById("registerName").addEventListener("keypress", function (event) {
var char = String.fromCharCode(event.which);
if (!(/[a-zA-Z]/.test(char))) {
event.preventDefault();
}
});


document.getElementById("loginForm").addEventListener("submit", function (event) {
event.preventDefault();
validateForm("login");
Expand Down

0 comments on commit e4395af

Please sign in to comment.