FW: [PHP] Re: email validation (no regex) - PHP
This is a discussion on FW: [PHP] Re: email validation (no regex) - PHP ; (Forwarding private reply to the list)
-----Original Message-----
From: Al Rider
Sent: Wednesday, September 21, 2005 2:19 PM
To: Jim Moseby
Subject: Re: [PHP] Re: email validation (no regex)
> What you have is virtually impossible to determine if all ...
-
FW: [PHP] Re: email validation (no regex)
(Forwarding private reply to the list)
-----Original Message-----
From: Al Rider
Sent: Wednesday, September 21, 2005 2:19 PM
To: Jim Moseby
Subject: Re: [PHP] Re: email validation (no regex)
> What you have is virtually impossible to determine if all legitimate
possibilities are covered.
> email validation using regex is a very heavily ****yzed subject
> Google "regex email validate" and you'll find loads of expressions.
Look at the Zend article, it provides some insight.
I fully understand about the almost limitless possibilities. Googling the
subject returns results more mind boggling than the regex itself.
) Do
ANY of the regex examples you have found cover all those possibilities? If
so, why are there so many different approaches? For most applications,
where you will only be validating a small number of emails in a given day,
why put yourself to all the regex pain, still to not have covered all the
possibilities?
In the end, with regards to email validation, all most people need is to
know that a given email has a proper username, just 1 '@' in the middle, and
a valid domain. If it doesn't, its a bogus email address.
JM
-
RE: [PHP] Re: email validation (no regex)
> > What you have is virtually impossible to determine if all legitimate
> possibilities are covered.
> > email validation using regex is a very heavily ****yzed subject
> > Google "regex email validate" and you'll find loads of expressions.
> Look at the Zend article, it provides some insight.
>
> I fully understand about the almost limitless possibilities. Googling the
> subject returns results more mind boggling than the regex itself.
) Do
> ANY of the regex examples you have found cover all those possibilities?
> If
> so, why are there so many different approaches? For most applications,
> where you will only be validating a small number of emails in a given day,
> why put yourself to all the regex pain, still to not have covered all the
> possibilities?
>
> In the end, with regards to email validation, all most people need is to
> know that a given email has a proper username, just 1 '@' in the middle,
> and
> a valid domain. If it doesn't, its a bogus email address.
As to that, why not validate the email address by sending an automated
message to the supplied account, requiring the person to click on a
validation link? Easy, simple, works better than either method currently
being discussed, purely for its simplicity, if nothing else.
Much warmth,
Murray
---
"Lost in thought..."
http://www.planetthoughtful.org
-
RE: [PHP] Re: email validation (no regex)
because you should want/need to validate that the address is correct prior
to determining if the email server is up running...
the regex function simply allows you to quickly determine if the address is
valid... doens't mean that it's going to go to an actual live user...!!
btw simply checking for a single '@' with a domain doesn't do it... what if
the user has 'foo@1.2.3.4' or 'r+foo@1.2.3.4'. will your regex accept/deny
this???
welcome to the world of email validation
-bruce
-----Original Message-----
From: Murray @ PlanetThoughtful [mailto:lists@planetthoughtful.org]
Sent: Wednesday, September 21, 2005 12:01 PM
To: 'Jim Moseby'; php-general@lists.php.net
Subject: RE: [PHP] Re: email validation (no regex)
> > What you have is virtually impossible to determine if all legitimate
> possibilities are covered.
> > email validation using regex is a very heavily ****yzed subject
> > Google "regex email validate" and you'll find loads of expressions.
> Look at the Zend article, it provides some insight.
>
> I fully understand about the almost limitless possibilities. Googling the
> subject returns results more mind boggling than the regex itself.
) Do
> ANY of the regex examples you have found cover all those possibilities?
> If
> so, why are there so many different approaches? For most applications,
> where you will only be validating a small number of emails in a given day,
> why put yourself to all the regex pain, still to not have covered all the
> possibilities?
>
> In the end, with regards to email validation, all most people need is to
> know that a given email has a proper username, just 1 '@' in the middle,
> and
> a valid domain. If it doesn't, its a bogus email address.
As to that, why not validate the email address by sending an automated
message to the supplied account, requiring the person to click on a
validation link? Easy, simple, works better than either method currently
being discussed, purely for its simplicity, if nothing else.
Much warmth,
Murray
---
"Lost in thought..."
http://www.planetthoughtful.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-
RE: [PHP] Re: email validation (no regex)
> because you should want/need to validate that the address is correct prior
> to determining if the email server is up running...
>
> the regex function simply allows you to quickly determine if the address
> is
> valid... doens't mean that it's going to go to an actual live user...!!
>
> btw simply checking for a single '@' with a domain doesn't do it... what
> if
> the user has 'foo@1.2.3.4' or 'r+foo@1.2.3.4'. will your regex accept/deny
> this???
>
> welcome to the world of email validation
>
> -bruce
>
> As to that, why not validate the email address by sending an automated
> message to the supplied account, requiring the person to click on a
> validation link? Easy, simple, works better than either method currently
> being discussed, purely for its simplicity, if nothing else.
I agree, so basic validation is A Good Thing. However, the most desirable
form of validation would have to be, can I send a legitimate email to that
account and receive acknowledgement that it's working by having the user
click on a validation link.
Much warmth,
Murray
---
"Lost in thought..."
http://www.planetthoughtful.org
-
RE: [PHP] Re: email validation (no regex)
> > because you should want/need to validate that the address is correct
> prior
> > to determining if the email server is up running...
> >
> > the regex function simply allows you to quickly determine if the address
> > is
> > valid... doens't mean that it's going to go to an actual live user...!!
> >
> > btw simply checking for a single '@' with a domain doesn't do it... what
> > if
> > the user has 'foo@1.2.3.4' or 'r+foo@1.2.3.4'. will your regex
> accept/deny
> > this???
> >
> > welcome to the world of email validation
> >
> > -bruce
> >
> > As to that, why not validate the email address by sending an automated
> > message to the supplied account, requiring the person to click on a
> > validation link? Easy, simple, works better than either method currently
> > being discussed, purely for its simplicity, if nothing else.
>
> I agree, so basic validation is A Good Thing. However, the most desirable
> form of validation would have to be, can I send a legitimate email to that
> account and receive acknowledgement that it's working by having the user
> click on a validation link.
After all, for all the regex / interrogation you perform, you still can't be
certain that the user entered an account *they own*. See? Sending a
validation email is *also* A Good Thing!
Much warmth,
Murray
---
"Lost in thought..."
http://www.planetthoughtful.org