[pLog-svn] Email Regex

Ammar Ibrahim ammar.ibrahim at gmail.com
Tue Jul 18 14:27:59 GMT 2006


The regex for the email validation rule is flawed.

    define( "EMAIL_FORMAT_RULE_REG_EXP",
"^[a-z0-9]*([-_.+]?[a-z0-9])+@[a-z0-9]+([-.]?[a-z0-9])+\.[a-z]{2,4}");

Not only some invalid emails pass this regex, yet worse, some valid emails
don't pass e.g. (ab__ar at hotmail.com, note the double underscores)

My suggestion would be to use the PEAR email validator, I've used it quite
alot and it looks to be very good and intensive. The validator package is
big, so we can just take the email validation part and integrate it in
LifeType. If this is what we agree on, I can work on this and send you the
code.


- Ammar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http:// devel.lifetype.net/pipermail/plog-svn/attachments/20060718/d5f51bc7/attachment.html


More information about the pLog-svn mailing list