Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: Addressing Form Field Validation with Regular Expressions and JavaScript 1.2, December 03, 2001 at 18:05:59:

You are here: 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

©2018 Martin Webb