Moving discussion to fw-formats list.
Chris, any news for us?
Cheers,
Gavin
-------- Original Message --------
Subject: Re: [fw-general] Filter_Input::testEmail() and Filter::isEmail()
Date: Sun, 01 Oct 2006 11:26:22 -0400
From: Chris Shiflett <[EMAIL PROTECTED]>
To: Gavin Vess <[EMAIL PROTECTED]>
CC: Lars Strojny <[EMAIL PROTECTED]>, [email protected]
Gavin Vess wrote:
http://www.nabble.com/forum/ViewPost.jtp?post=5512516&framed=y&skin=16154
Still looking for a community volunteer to help contact the 3 authors
above, and review their popular implementations.
I'll contact Cal. Assuming he agrees to sign the CLA, that should mean
that any of us can review and compare his implementation, right?
Chris
Shahar Evron wrote:
Hi,
What's the status of Zend_Filter::isEmail() ?
I've created some supposedly RFC 2822 compliant validation function
based on http://www.ilovejackdaniels.com/php/email-address-validation/ :
/**
* Returns value if it is a valid email format, FALSE otherwise.
*
* @param mixed $value
* @return mixed
*/
public static function isEmail($value)
{
// First make sure we have all parts, and in right lengths
if (! preg_match("/[EMAIL PROTECTED],[EMAIL PROTECTED]@]{1,255}$/",
$value))
return false;
// Split address into local part and domain part
list($local, $domain) = explode('@', $value);
// Check local part
if (!
preg_match('/^[\w!#$%&\'*+-\/=?^`{|}~"]([\w!#$%&\'*+-\/=?^`{|}~."]|\\\\
)*$/', $local)) return false;
// Check domain part
if (! self::isHostname($domain, self::HOST_ALLOW_ALL))
return false;
return $value;
}
but I'm not sure it works.
You're welcome to test it, maybe we can get that (so needed) method
already ;)
Shahar.
--
Cheers,
Gavin
Which ZF List?
=================
Everything, except the topics below: [email protected]
Authorization, Authentication, ACL, Access Control, Session Management
[EMAIL PROTECTED]
Tests, Caching, Configuration, Environment, Logging
[EMAIL PROTECTED]
All things related to databases
[EMAIL PROTECTED]
Documentation, Translations, Wiki Manual / Tutorials
[EMAIL PROTECTED]
Internationalization & Localization, Dates, Calendar, Currency, Measure
[EMAIL PROTECTED]
Mail, MIME, PDF, Search, data formats (JSON, ...)
[EMAIL PROTECTED]
MVC, Controller, Router, Views, Zend_Request*
[EMAIL PROTECTED]
Community Servers/Services (shell account, PEAR channel, Jabber)
[EMAIL PROTECTED]
Web Services & Servers (HTTP, SOAP, Feeds, XMLRPC, REST)
[EMAIL PROTECTED]
How to un/subscribe: http://framework.zend.com/wiki/x/GgE