QF validation Javascript generation for groups

From: Date: Tue, 16 Dec 2003 12:26:14 +0000
Subject: QF validation Javascript generation for groups
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9558@lists.php.net to get a copy of this message
Hi! I am about to understand how I can have QF generate Javascript for me. Only now I want it more complex. I want to validate the group itself. How do I access the values in the group in JavaScript. What is the function "getValidationScript" supposed to get and give back? Did I miss some pointers where I can find more information? More practical I want to put this function in JavaScript: function validate($value, $options) { $count=0; foreach ($value as $key=>$value) if ($value!='') $count++; if ($count>$max) return false; else return true; } It checks how many values are set. In contrast to the "howmany" parameter of "required" - this function checks whether there are too many values (not too few). Regards Daniel

« previous php.pear.general (#9558) next »