V
VbUser25
Hi
Please suggest i think i am doing something wrong. I am calling fucntion
test from another function where i am performing all the validations.I
want to validate the email id.
this is the main function where i perform all sort of mandatory
validation==>
if (document.f.repemail.value != ""){
if(test(document.f.repemail.value=false)) {
alert("Please Enter a valid Email ID!");
document.f.repemail.focus();
}
else {return;}
}
Here is fucntion test:
function test(src)
{ var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
var regex = new RegExp(emailReg);
alert(regex.test(src));
return regex.test(src);
}
I am nto getting validated at all!!! where is hte mistake i am doing.
pls do suggest!
thanks to those who respond.
Please suggest i think i am doing something wrong. I am calling fucntion
test from another function where i am performing all the validations.I
want to validate the email id.
this is the main function where i perform all sort of mandatory
validation==>
if (document.f.repemail.value != ""){
if(test(document.f.repemail.value=false)) {
alert("Please Enter a valid Email ID!");
document.f.repemail.focus();
}
else {return;}
}
Here is fucntion test:
function test(src)
{ var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
var regex = new RegExp(emailReg);
alert(regex.test(src));
return regex.test(src);
}
I am nto getting validated at all!!! where is hte mistake i am doing.
pls do suggest!
thanks to those who respond.