RE: [Phplib-users] New phpauth code
Brought to you by:
nhruby,
richardarcher
|
From: Layne W. <la...@if...> - 2002-05-06 21:03:14
|
> > I try to register in your site, but get response that my
> email is invalid.
> > Althought my email is valid for years (not this but other).
>
> The email address is checked against a simple regular expression.
> preg_match('/^([a-z0-9\-_\.\&]+)@([a-z0-9\-]+\.)+[a-z]+$/',$email);
> I assume you're mixing case (email addresses and domain names are case
> insensitive).
If email addresses are case insensitive, why do you force your (lower) case
preference? Using uppercase letters is quite valid and often makes email
addresses more human-readable.
In addition to checking email addresses against a simple format, I check
against all known TLDs. I also find it useful to warn users if I cannot find
an MX record for their domain. This prevents numerous "us...@ho..."
attempts.
Layne Weathers
Ifworld Inc.
|