Re: Email Valadation
| From: | Lars Torben Wilson | Date: | Tue, 17 Jun 2003 09:54:43 +0000 |
| Subject: | Re: Email Valadation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151805@lists.php.net to get a copy of this message | ||
On Tue, 2003-06-17 at 02:42, Philip J. Newman wrote:
> How would i valadate an email string to see if it has invalid charactors?
>
> / Philip
Read RFC 822 and grok it thoroughly. Then decide exactly how lax you
can afford to be in your checking, or find a checker to download--
because unless you crave the challenge it's probably easier to either
do a really simple check, or just download a checker. It's a much
harder question than it sounds like.
For a couple of perl examples of how it can be done, check here:
http://examples.oreilly.com/regex/readme.html
I would suggest checking on ps.sklar.com, Zend.com, phpclasses.org, etc
for some rfc822 checkers.
--
Torben Wilson <torben@php.net> +1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com http://www.themainonmain.com
-----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----