Re: Poll of sorts: Javascript Form validation or PHP
| From: | tedd | Date: | Sun, 07 Dec 2008 16:15:09 +0000 |
| Subject: | Re: Poll of sorts: Javascript Form validation or PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284263@lists.php.net to get a copy of this message | ||
At 1:59 PM +0000 12/7/08, Luke Slater wrote:
/** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. Not following the usual coding style I know but I can't bring myself to touch it... You'd better not touch it either, Rob: That means you. Author: Humblehope Modified: 06/06/2007 **/ -snip-I'm impressed. The php routine passed a@x.com (which is real), but failed a@a.com (which is not real). What's needed is a javascript routine to do the same thing, but it would require a trip to the server to check the domain. As such, I would use AJAX to trigger this php routine to provide validation -- that might prove interesting, huh? Apparent real-time validation -- hmmm, I'm going to think about that. The php routine also passed tedd@xn--nvg.com, which is real -- but it's interesting that most email (if not all) programs cannot show the domain name correctly, which is tedd@*.com. I have yet to find an email program that can show IDNS correctly. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com