Click here to Skip to main content
15,903,033 members

Comments by Joshna J U (Top 7 by date)

Joshna J U 17-Jan-22 11:07am View    
Email Address



---------------
var regEmail = /^\S+@\S+$/;
var e_mail = document.getElementById('email').value.toLowerCase().trim();
if (!regEmail.test(e_mail)) {
document.getElementById('emailErr').innerHTML = 'Please enter a valid email address.';
document.getElementById('email').focus();
isValid = false;
} else {
document.getElementById('emailErr').innerHTML = '';
}
Joshna J U 17-Jan-22 10:43am View    
in the html part , there is a div to show the error message ,its is not working..
i tested same with email,password input fields error message is showing bt here its not working...
Joshna J U 17-Jan-22 9:03am View    
Bt if I give letters error is not showing
Joshna J U 17-Jan-22 7:13am View    
i have posted the script part cant able to post the html part
Joshna J U 17-Jan-22 7:08am View    
Deleted
form name="contactForm" onsubmit="validate(event)" action="#" method="post"
div class="row"
label>Phone