Gossamer Forum
Home : General : Perl Programming :

emaill validation

Quote Reply
emaill validation
for years i have been using the following in my dbman def files to validate email addresses:

'.+@.+..+'

for the first time, someone entered a space in the email address and the db accepted it. the user didn't get an error until attempting to send an email to the invalid address. i found the following expression, which seems to work.

'^[-\w.]+@([A-z0-9][-A-z0-9]+\.)+[A-z]{2,4}$'

do you see any problems with it?

i'm actually amazed this hasn't come up before. thanks!
Subject Author Views Date
Thread emaill validation delicia 5909 Mar 7, 2014, 8:28 AM
Thread Re: [delicia] emaill validation
Andy 5815 Mar 7, 2014, 11:14 AM
Post Re: [Andy] emaill validation
delicia 5802 Mar 9, 2014, 4:28 PM