dougcranston
Technical User
I have a question. One that my meager brain can fathom but cannot resolve.
I would like use a regex function to validate whether or not the user has entered the expected @subdomain.domain.org
Specifically, I need to make sure the users key in as an example: theirname@core.company.com where @core.company.com must be there and if not fail..
I know this can be done but no thoughts..
My old snippet is:
var valemail = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
if (valemail.test(document.reportreq.reqemail.value) == true) {
}
else {
alert("You must enter your full Email Address (i.e. XXXX@company.com). Please try again.");
document.reportreq.reqemail.focus();
return false;
}
But this requirement is very specific..
Any suggestions would be greatly appreciated..
Searched here and in the faq and via search site but no luck so far...
If you know of a site that describes this or has a snippet I could look at I would really appreciate it.
Thanks in advance...
Dougc
I would like use a regex function to validate whether or not the user has entered the expected @subdomain.domain.org
Specifically, I need to make sure the users key in as an example: theirname@core.company.com where @core.company.com must be there and if not fail..
I know this can be done but no thoughts..
My old snippet is:
var valemail = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
if (valemail.test(document.reportreq.reqemail.value) == true) {
}
else {
alert("You must enter your full Email Address (i.e. XXXX@company.com). Please try again.");
document.reportreq.reqemail.focus();
return false;
}
But this requirement is very specific..
Any suggestions would be greatly appreciated..
Searched here and in the faq and via search site but no luck so far...
If you know of a site that describes this or has a snippet I could look at I would really appreciate it.
Thanks in advance...
Dougc