/** * Rangle validator: is a control's value number in specified range? * @param TextBase * @param array min and max value pair * @return bool */ public static function validateRange(TextBase $control, $range) { return ($range[0] === NULL || $control->getValue() >= $range[0]) && ($range[1] === NULL || $control->getValue() <= $range[1]); }
/** * Rangle validator: is a control's value number in specified range? * @param TextBase * @param array min and max value pair * @return bool */ public static function validateRange(TextBase $control, $range) { return $control->getValue() >= $range[0] && $control->getValue() <= $range[1]; }
/** * Rangle validator: is a control's value number in specified range? * @param TextBase * @param array min and max value pair * @return bool */ public static function validateRange(TextBase $control, $range) { return Validators::isInRange($control->getValue(), $range); }