Re: Search method or RegExp?
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Thu, 30 Aug 2007 09:52:38 +0200
RobG wrote:
[...] "Ben Amada" [...] wrote:
Hi all. I know very little about regular expressions, but wanted to use one
to validate an email address a user would be entering before the form is
submitted.
Rigorous validation of e-mail address is impossible,
Correct, client-side. Server-side you stand a very good chance.
the best you can do client-side is a rough test
It would not be too difficult to implement the address specification of
RFC2822 in a Regular Expression though. I have done that twice or more
now here, so searching the archives is probably not a bad idea.
then send an email to the address to verify it.
It has been my observation that is possible server-side to get a reliable
test result in most cases without sending an e-mail, using an automated
SMTP probe, provided the testing server is, or has access to, a properly
configured MX.
But, as you say, only sending an e-mail and having the receiver confirm
it can make sure that e-mails to the mailbox are actually read.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
.
- References:
- Search method or RegExp?
- From: Ben Amada
- Re: Search method or RegExp?
- From: RobG
- Search method or RegExp?
- Prev by Date: Re: Event Handling Question
- Next by Date: pls help....media player wont play
- Previous by thread: Re: Search method or RegExp?
- Next by thread: Re: Search method or RegExp?
- Index(es):
Relevant Pages
|