Zend Framework

Implement Zend_Filter::isEmail()

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 0.1.3, 0.1.4, 0.1.5
  • Fix Version/s: None
  • Component/s: Zend_Filter
  • Labels:
    None

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:]_-]+)*)?@([[:alnum:]-_]\.)[a-zA-Z]{2,4}$/

Issue Links

Activity

Hide
Udo Gerhards added a comment -

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

Show
Udo Gerhards added a comment - 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
Hide
Darby Felton added a comment -

Duplicates ZF-42

Show
Darby Felton added a comment - Duplicates ZF-42
Hide
Wil Sinclair added a comment -

Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

Show
Wil Sinclair added a comment - Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: