Closed Thread Icon

Topic awaiting preservation: Multiple JavaScript E-mail Validation Pages that link to <a href="https://ozoneasylum.com/backlink?for=8267" title="Pages that link to Topic awaiting preservation: Multiple JavaScript E-mail Validation" rel="nofollow" >Topic awaiting preservation: Multiple JavaScript E-mail Validation\

 
Author Thread
sdna2k
Bipolar (III) Inmate

From: Plano, TX
Insane since: Jun 2001

posted posted 08-20-2002 18:21

Does anyone know of a JavaScript for multiple e-mail address validation (for my purposes, two e-mail addresses)?

As always, thanks in advance!

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 08-20-2002 19:28

Well most email validation scripts are some sort of regular expressions checked against the value given here's a simple function to check an email addy

code:
function checkemail(str){
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str)) {
return true;
}else {
return false;
}
}



Now you can just check the values through this function. Are you familiar with the general process for validating forms when they are submitted?



.:[ Never resist a perfect moment ]:.

sdna2k
Bipolar (III) Inmate

From: Plano, TX
Insane since: Jun 2001

posted posted 08-20-2002 22:12

I think I can see the crux of what you're saying, but my problem is knowing which variable names to exchange for my two form fields ("To" and "From").

« BackwardsOnwards »

Show Forum Drop Down Menu