+ 1
Javascript validation
I have this code and it still passes validation without an @ symbol function validateEmail() { var emailID = document.myForm.EMail.value; atpos = emailID.indexOf("@"); dotpos = emailID.lastIndexOf("."); if (atpos < 1 || ( dotpos - atpos < 2 )) { alert("Please enter correct email ID") document.myForm.EMail.focus() ; return false; } return( true ); }
2 Respostas
+ 1
Hi David!
This seems like a statement. Did you have a question about this?
-- Janning.
0
yea why is it still allowing validation without the @