QF 'Compare' Rule

From: Date: Tue, 27 Jan 2004 17:10:39 +0000
Subject: QF 'Compare' Rule
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10392@lists.php.net to get a copy of this message
Hi, A little boggled on how to use the defined operators in the 'Compare' rule. If I'm thinking right it might be possible to see if a numeric value in a text box is greater or less than a specified value. But how is this written in the addRule() method? The example rules-builtin.php doesn't do much with this rule. The following fails:- $this->addGroupRule('heightGroup', array( 'height1' => array( array($language['L_RequireHeightNumeric'], 'numeric', null, 'client'), array($language['L_InvalidHeightNonZero'], 'nonzero', null, 'client'), array($language['L_InvalidHeightRange'], 'compare', array(0, 2), 'client'), ) ), null, null, 3, 'client', false); Regards, -- Mike Carter

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