Gossamer Forum
Home : Products : DBMan : Discussions :

valid_expr for Email

Quote Reply
valid_expr for Email
I want to validate the email address. what would the expression be?

I want something like Whatever@whatever.whatever

Is it possible to validate the @ and .

Quote Reply
Re: valid_expr for Email In reply to
return "Invalid Email" unless ($in{'Email'} =~ /.+@.+\..+/);

Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: valid_expr for Email In reply to
In your .cfg file you can use:

'Email' => [ 4,'alpha',25,70,1,'','.+@.+..+'],

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: valid_expr for Email In reply to
Er Lois I think you'll find that would match:

bla@bla/com
bla@bla"com
bla@bla)com
bla@bla$com

etc....not really valid are they Smile

Use:

Code:
'Email' => [ 4,'alpha',25,70,1,'','.+@.+\..+'],
Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/