Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: Addressing Form Field Validation with Regular Expressions and JavaScript 1.2

irt.org | About | Feedback | 3393 [ previous next ]

Feedback on:
Addressing Form Field Validation with Regular Expressions and JavaScript 1.2

Sent by
Stefan Berglund on December 03, 2001 at 18:05:59:

Comments:
The emailchecking is just plain wrong!
First: You can not check that an address is correct except trying to send mail to it and wait for an answer.

Second: The code that checks for a syntactically correct mailaddress flags syntactically correct addresses as invalid, for example the common syntax local+tag@domain or the address *@domain.
As it is very complicated to make a 100% correct check, why not make a check that should pass all valid (except uucp-style) and some invalid ones as well, your MTA must do the check for real anyway, so:

^.*@[^.]+(\.[^.]+)+$

Or one that obeys the KISS-principle:

.+



Other feedback on 'Addressing Form Field Validation with Regular Expressions and JavaScript 1.2' - show all


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.