WannaLearn
Programmer
Hi. I need some help with a email validation.
I know how to do a simple validation that checks to make the sure the field is not blank, has a '@' sign and a ".", but how can I make it to check that at least 2 characters are entered before the @, 2 characters after the . and an acceptable domain name (like: com, net, edu, uk, etc), prefreably in an array so I can add more domain names later.
I found a script online that did all that, but I don't want to use it. I'd rather write the code myself. Any help? Any ideas?
Thanks.
I know how to do a simple validation that checks to make the sure the field is not blank, has a '@' sign and a ".", but how can I make it to check that at least 2 characters are entered before the @, 2 characters after the . and an acceptable domain name (like: com, net, edu, uk, etc), prefreably in an array so I can add more domain names later.
I found a script online that did all that, but I don't want to use it. I'd rather write the code myself. Any help? Any ideas?
Thanks.