Re: Email Address Validation
- From: Brian Wakem <no@xxxxxxxxx>
- Date: Wed, 22 Jun 2005 15:13:13 +0100
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
.
- Follow-Ups:
- Re: Email Address Validation
- From: Dave Weaver
- Re: Email Address Validation
- References:
- Email Address Validation
- From: Bob
- Email Address Validation
- Prev by Date: Re: Is there a symbol table for special vars?
- Next by Date: Re: Need regexp to rejoin URL links broken by \n
- Previous by thread: Re: Email Address Validation
- Next by thread: Re: Email Address Validation
- Index(es):