Thread: Email Validate
View Single Post
  #2 (permalink)  
Old June 6th, 2003, 02:36 AM
Moharo Moharo is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Moharo
Default

that depends on what kind of stuff you want to check in email. good start is detecting "@" and "." characters and also empty space " ". here's how you can do it:

function checkEmail(email) {
     if(email.indexOf("@")!=-1 && email.indexOf(".")!=-1 && email.indexOf(" ")!=-1) {
     alert("Specified email address is invalid");
     return false; }
     else alert("Good email address");
}

that should do it

the genuine genius
Reply With Quote