Re: Poll of sorts: Javascript Form validation or PHP

From: Date: Sun, 07 Dec 2008 16:23:18 +0000
Subject: Re: Poll of sorts: Javascript Form validation or PHP
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-284264@lists.php.net to get a copy of this message
Well to reproduce most of that would perhaps be fairly easy, most of it is regex stuff. There may be trouble with the checkdnsrr() stuff though, which is for checking that the domain exists. I wouldn't imagine there would be anything like that for JS... Perhaps there is... You could always do an AJAX request :) On Sun, 7 Dec 2008, tedd wrote:
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#284264) next »