Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18246
| From | Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Email Vali8dation Problem |
| Date | 2013-01-24 19:59 +0000 |
| Organization | Home |
| Message-ID | <JqhEReJ0KZARFws0@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <amb6f9Fhvk3U1@mid.individual.net> |
In comp.lang.javascript message <amb6f9Fhvk3U1@mid.individual.net>, Wed,
23 Jan 2013 15:27:43, Mel Smith <med_cutout_syntel@aol.com> posted:
>
> I have the following undernoted isEMail() function defined in the <head>
>section of a page
>
There is little point in trying to validate the format of an E-address
(except for those writing E-mail software) when there is no possibility
of writing code that will report
reply1300@merlyn.demon.co.uk as good and
reply1300@merlyn.denom.co.uk as probably no good
Of those, the first should, IIRC, apparently be delivered, but will
bounce after 30 days (unless in the meanwhile I change what that address
does), while the second is to an address which (at this instant) does
not exist.
Also, if you "validate" against what you apparently think the format
should be, you will reject valid (admittedly uncommon) types of address
[e.g. designed to work, but not to be believed by address harvesters].
Before attempting a validator, you should find, read, and understand the
latest applicable RFC for E-addresses.
It should be useful, though, to check that the string provided might
possibly an E-address - users sometimes may get their field order wrong
and insert their snail-mail address or telephone number instead.
A valid address will contain at least one character, followed by @,
followed by at least one character, followed by a dot, and ending with
at least two alphabetic characters (though the RFC itself may be more
(or less) lenient) - and it will not end in ".invalid" or, IIRC & in
practice, "example.com".
In any case, the name of your function should be changed to maybeEmail
or suchlike.
For my more considered but older thoughts, look in
<http://www.merlyn.demon.co.uk/js-valid.htm>.
--
(c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Email Vali8dation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-23 15:27 -0700
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 01:18 +0100
Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 02:06 +0100
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 22:30 +0100
Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 22:38 +0100
Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-24 13:04 +1100
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 22:24 +0100
Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 22:40 +0100
Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 00:12 +1100
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-25 21:56 +0100
Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 10:56 +1100
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 01:56 +0100
Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 20:14 +1100
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 13:21 +0100
Re: Email Vali8dation Problem Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-01-26 15:07 +0200
Re: Email Vali8dation Problem "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-01-26 16:04 +0200
Re: Email Vali8dation Problem Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-01-26 16:37 +0200
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 15:46 +0100
Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-27 10:30 +1100
Re: Email Vali8dation Problem Andreas Bergmaier <andber93@web.de> - 2013-01-24 01:58 +0100
Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 02:08 +0100
Re: Email Vali8dation Problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-24 10:25 +0100
Re: Email Vali8dation Problem Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-01-24 11:15 +0100
Re: Email Validation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-24 08:53 -0700
Re: Email Validation Problem Luc Yen <luc@goal.tw> - 2013-01-25 13:53 -0800
Re: Email Vali8dation Problem Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-24 19:59 +0000
Re: Email Vali8dation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-25 09:37 -0700
Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-25 22:08 +0100
Re: Email Vali8dation Problem Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-26 20:51 +0000
csiph-web