Re: custom grouprule

From: Date: Tue, 23 Feb 2010 11:05:57 +0000
Subject: Re: custom grouprule
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30308@lists.php.net to get a copy of this message
I've figured it out.... Sorry - you can ignore the previous message ----- Original Message ----- From: Andrea Bakker To: pear general Sent: Tuesday, February 23, 2010 11:00 AM Subject: custom grouprule Hi I have a group field for entry of a time hh:mm. I want to validate the time but am not sure how to access the values it is passing to the function. $eventform->addGroup($eventtime,'eventtime','Event Time (hh:mm)',':'); // Add the rules to the group $eventform->addGroupRule('eventtime',array($hour_rules, $minute_rules)); $eventform->registerRule('timevalid','function','valid_time'); $eventform->addGroupRule('eventtime','Invalid Time', 'timevalid'); function valid_time($element_name, $element_value) { echo "inside valid time"; $isValid = true; echo "this is element name " . $element_name; echo "this is element value " . $element_value; } It only appears to be passing the minutes, not the hour. Any assistance would be appreciated. Thanks Andrea

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