ZF-258: Implement Zend_Filter::isEmail()
Description
While Zend_Filter_Input::testEmail() is already advertised in the manual, said method relies on Zend_Filter::isEmail(), which currently contains nothing more than a TODO marker. I don't know what kind of mega-super-duper email validation stuff was originally planned for this, but considering the method is needed by methods that are documented as if they were working, wouldn't it be nice to at least put a simple RegEx in place here, so that the method at least works in 95% of all cases?
If nothing else, it saves first-time users from having to backtrack the source of the problem throughout the ZF source.
Here's a regex that works for me: /^a-zA-Z?@([[:alnum:]-_]+.)+[a-zA-Z]{2,4}$/
Comments
Posted by Udo Gerhards (ugerhard) on 2006-07-17T04:32:20.000+0000
There has been an issue opened for this since the Trac days of the ZF, including a patch:
http://framework.zend.com/issues/browse/ZF-42
Posted by Darby Felton (darby) on 2006-07-24T11:22:57.000+0000
Duplicates ZF-42
Posted by Wil Sinclair (wil) on 2008-12-19T13:35:09.000+0000
Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.