Re: Email Address Validation



Bob wrote:

> I am not a code type guy, and the code below was given to me it works
> but what I would like to do is put in some sort of email address
> validation as I am not a coder I need as much help as I can get and
> any help would be better than none.

>
> # If the comments are blank, then give a "blank form" response
> &blank_response3 unless $FORM{'emailaddress'};


Ask 5 programmers how to validate an email address and you'll get 6
different answers.


invalid_email_response() unless $FORM{'emailaddress'} =~
m/^[-a-zA-Z0-9_.]+\@[-a-zA-Z0-9_]+\.[-a-zA-Z0-9_.]+[a-zA-Z]$/;

sub invalid_email_response {
print "Enter a real email address please";
}


--
Brian Wakem

.