Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23841
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Check an input field type='email' has validated successfully |
| Date | 2014-04-10 20:49 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <li7058$pe5$5@dont-email.me> (permalink) |
| References | <d72788d9-2a59-4d3a-b5d2-24aebc9abbec@googlegroups.com> |
On Thu, 10 Apr 2014 10:29:45 -0700, anthony.glazebrook wrote: > Is there any way to check the input field has correctly > validated without re-checking using a regular expression? The only "validation" you can do on an email address is to verify that it matches some predefined format specification of what an email address should look like. You can't truly validate it, because the only true validation of an email address is to verify that the recipient actually receives email, and javascript in itself can't do that. There are a lot of javascript solutions for verifying the format of an email address. Many of them have flaws. There may be a perfect one, but I've never found it. The most you can do in javascript is make an ajax call to a server that tries to send a test message to the recipient, and reports the status of that attempt back, but that's not 100% foolproof, as it only verifies that the an upstream (or downstream) mta accepts the email, it doesn't truly confirm that the destination mailbox actually exists. The best easy check in javascript is probably that the email address given contains no spaces, one and only one "@" symbol, and at least one period on the right hand side of the "@". You can get more complex, the more complex you get the higher the risk of rejecting a valid email address. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Check an input field type='email' has validated successfully anthony.glazebrook@gmail.com - 2014-04-10 10:29 -0700
Re: Check an input field type='email' has validated successfully "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-04-10 20:24 +0200
Re: Check an input field type='email' has validated successfully Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-10 20:49 +0000
Re: Check an input field type='email' has validated successfully Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2014-04-11 18:37 +0300
Re: Check an input field type='email' has validated successfully Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-11 18:12 +0200
Re: Check an input field type='email' has validated successfully Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-11 22:51 +0000
Re: Check an input field type='email' has validated successfully Andreas Bergmaier <andber93@web.de> - 2014-04-11 01:29 +0200
Re: Check an input field type='email' has validated successfully "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-04-11 09:01 +0200
Re: Check an input field type='email' has validated successfully Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-11 11:02 +0200
Re: Check an input field type='email' has validated successfully Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-11 11:48 +0200
csiph-web