Controller_Validator_Basic::rule_between PHP Method

rule_between() public method

Overloaded: checks value for numbers, string-length for other values. Next 2 rules must specify the min and max
public rule_between ( $a )
    public function rule_between($a)
    {
        $min = $this->pullRule(true);
        $max = $this->pullRule(true);
        if (is_numeric($a)) {
            if ($a < $min || $a > $max) {
                return $this->fail('must be between {{arg1}} and {{arg2}}', $min, $max);
            }
        } else {
            return $this->fail('Must be a numeric value');
        }
    }