[aur-dev] [PATCH 2/5] use valid_email() from codeigniter's email helper

Ángel Velásquez angvp at archlinux.org
Fri Jun 24 10:38:26 EDT 2011


2011/6/24 Lukas Fleischer <archlinux at cryptocrack.de>:
> On Wed, Jun 22, 2011 at 10:11:28PM +0200, Cédric Girard wrote:
>> On Wed, Jun 22, 2011 at 9:36 PM, Florian Pritz <bluewind at xinu.at> wrote:
>>
>> >  +       return ( !
>> > preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix",
>> > $addy)) ? FALSE : TRUE;
>> >
>>
>> Some legitimate email address will not be matched by your regexp.
>>
>> Better use built-in PHP functions:
>>
>> return filter_var($addy,FILTER_VALIDATE_EMAIL);
>
> I prefer this one. Given that the PHP release enabling filter extensions
> by default was released about 4.5 years ago, I'd say we can push this.
>
> Objections?
>

None objections.

+1 for Cédric suggestion


-- 
Angel Velásquez
angvp @ irc.freenode.net
Arch Linux Developer / Trusted User
Linux Counter: #359909
http://www.angvp.com


More information about the aur-dev mailing list