Re: Re: Email Validation built-in? RFC
| From: | Richard Lynch | Date: | Sun, 23 Oct 2005 01:59:16 +0000 |
| Subject: | Re: Re: Email Validation built-in? RFC | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224494@lists.php.net to get a copy of this message | ||
On Sat, October 22, 2005 2:32 pm, James Benson wrote:
> It would be nice to have a php function valid_email or something but
> until then i suppose we just make do with what is available, for what
> I
> need I use the following:-
>
> eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
>
> ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)
>
> Ive never had problems with it but have up to now no need for
> multilanguage validation.
>
> What is wrong with that validation anyway?
If you are lucky, it does not reject any valid emails.
For sure, however, it is not the 3-page 'correct' validation and
therefore must accept at least SOME invalid emails...
Almost for sure, it doesn't accept the new-fangled international emails.
Presumably, if a built-in PHP function did this, changing it in one
place would make everybody's code work right for this monumental
change...
--
Like Music?
http://l-i-e.com/artists.htm