I sent you a PM with some RegEx masks for validation.
For email validation, I usually do the following:
Code:
...
if(df.emailTo.value.length < 6) {
warn += "Please enter a valid TO: email address.\n"; }
else {
if(!checkEmail(df.emailTo.value)) { // Exclamation mark means 'not', 'false', or just plain 'didnt'
warn += "Please make sure TO: email address is valid.\n"; }
}
...
And then I'll have another function for checking the format:
Code:
function checkEmail(inputvalue){
var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
if(pattern.test(inputvalue)){
return true;
}else{
return false;
}
}
^_^
Bookmarks