Kore Nordmann wrote: > *vote* > >> 1. Which regexp to use for email validation? >> >> a. >> http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/Rule/Email.php?revision=1.4&view=markup >> b. http://iamcal.com/publish/articles/php/parsing_email/ >> c. http://code.iamcal.com/php/rfc822/full_regexp.txt >> d. http://ex-parrot.com/~pdw/Mail-RFC822-Address.html >> e. http://www.tienhuis.nl/files/email_verify_source.php >> f. This one (please specify): _________________ >> g. Write our own one > > h) ... no opinion ;)
> I skip the first one, no matter what you say. ;) ... I can not properly > evaluate the regular expressions right now to give a definite answer. Would it be sensible to allow the developer to specify his own regular expression for validation? For example by using a class option like we do in other places. So a developer who doesn't need an advanced email validation can do: <code> ezcMailTools::$emailAddressValidationRegexp = "([EMAIL PROTECTED])"; $isValid = ezcMailTools::validateEmailAddress( $address ); </code> The default expression could be "a" which is also used in ext/filter as Derick said. By the way, it seems only 2 people responded to the vote so far. I will extend the deadline until August 6, 09:00 CET. After that no more new opinions will be taken into account. Where are all the people? I don't believe that everybody is on vacation, because the IRC channel seems lively enough, with discussions ranging from food recipes to rubber ducks. But nobody reads the mailing list? I thought the words SUMZERO must mean something by now. The answers so far are (including my own): 1. a (2), n/a (1) 2. c (2), e (1) 3. b (1+1), a (1+1) - the punycode functions can be included in all the components that need them, we don't necessarily need to put them in only one place. So it could be in Mail AND Url (and in other places). Bad practice, but easier to think about and it excludes dependencies. 4. e (2), b (1) 5. b (2), other (1) -- Alexandru Stanoi eZ Components System Developer eZ Systems | http://ez.no -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components