Validate if given digit is in between given min and max value in rules.

@param $key
@param $value
@return bool
194354
protected function isBetween($key, $value) : bool
    {
        $data = string_split($value, ',');
        $min = (int) $data[0];
        $max = (empty($data[1])) ? PHP_INT_MAX : (int) $data[1];
        $num = $this->param[$key];

        if (!is_numeric($num)) {
            $this->errors[$key.self::ERROR] = $this->convertToFieldName($key)." must numeric.";
            return false;
        }

        if ($num > $min && $num < $max) {
            return true;
        }

        $this->errors[$key.self::ERROR] = $this->convertToFieldName($key)." must have a length between the given $min and $max.";
        return false;
    }
1059952
protected function validateItem($key, $value): bool
    {
        // run validators chain
        $result = $this->validators[$key]->validate($value);

        if (!$result) {
            $this->exception->setError($key, $this->validators[$key]->getError());
        }

        return $result;
    }
576694
public function validate(string $value)
    {
        if (!$value || $value >= $this->minimumValue) {
            return;
        }

        $this->error['min.%'] = [$this->minimumValue];
    }
1071212
public function validate(string $value)
    {
        if (!$value || $value <= $this->maximumValue) {
            return;
        }

        $this->error['max.%'] = [$this->maximumValue];
    }
495543
public static function isLt($value, $min)
    {
        is_array($min) && $min = $min[0];
        if (!is_numeric($value)) {
            return false;
        } elseif (function_exists('bccomp')) {
            return bccomp($min, $value, 14) == 1;
        } else {
            return $value < $min;
        }
    }
339859
protected final function _isBetweenMinAndMax($key,$value){

        if(($min = $this->getDefinitionValue($key,'min')) !== false && $value < $min){
            return $this->setError($key,"`{$key}` must be greater than {$min}");
        }//if

        if(($max = $this->getDefinitionValue($key,'max')) !== false && $value > $max){
            return $this->setError($key,"`{$key}` must be less than {$max}");
        }//if

        return true;

    }
200611
public function rule_max( $key, $value, $max )
	{
		return $this->rule_max_num( $key, strlen( $value ), $max );
	}
379751
protected function _validator_minlength($input, $value, $min) {
		if (!is_string($value)) return false;
		if (strlen($value) < $min) return false;
		return true;
	}
532373
public function isValid($value)
    {
        $this->_setValue($value);

        if ($this->_inclusive) {
            if ($this->_min > $value || $value > $this->_max) {
                $this->_error(self::NOT_BETWEEN);
                return false;
            }
        } else {
            if ($this->_min >= $value || $value >= $this->_max) {
                $this->_error(self::NOT_BETWEEN_STRICT);
                return false;
            }
        }
        return true;
    }
27806
protected function _validate($value)
    {
        // Look for Ymd keys?
        if (is_array($value)) {
            $value = $this->_arrayToDate($value);
        }

        // basic date format yyyy-mm-dd
        $expr = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/D';

        return (preg_match($expr, $value, $match) && checkdate($match[2], $match[3], $match[1]));
    }
806341
public function validateValueFixedPriceRule($value)
    {
        $field = 'value';
        $label = $this->translation->text('Value');

        if (!is_numeric($value)) {
            $this->setErrorNumeric($field, $label);
            return false;
        }

        if (strlen($value) > 8) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
789202
public static function isBetween($value, $min, $max, $inclusive = false)
    {
        \settype($min, 'int');
        \settype($max, 'int');
        \settype($inclusive, 'bool');

        $length = \mb_strlen($value, \mb_detect_encoding($value));

        if ($min > $max) {
            throw new \InvalidArgumentException(\sprintf('%s cannot be less than  %s for validation', $min, $max));
        }

        if (false === $inclusive) {
            return $min < $length && $length < $max;
        }

        return $min <= $length && $length <= $max;
    }
528229
public static function isLte($value, $min)
    {
        is_array($min) && $min = $min[0];
        if (!is_numeric($value)) {
            return false;
        } else {
            return $value <= $min;
        }
    }
1260685
public function isValid($value)
    {
        $ok = true;
        
        if (!preg_match('/^[0-9]+(\.[0-9]+)?$/', $value)) {
            $this->error(self::SYNTAX);
            return false;
        }
        
        if ($value < $this->options['min']) {
            $this->error(self::MIN);
            $ok = false;
        }
        
        if ($value > $this->options['max']) {
            $this->error(self::MAX);
            $ok = false;
        }
        
        $parts = explode('.', $value);
        if (isset($parts[1]) && strlen($parts[1]) > $this->options['precision']) {
            if ($this->options['precision']) {
                $this->error(self::PRECISION);
            } else {
                $this->error(self::NO_COMMA);
            }
            $ok = false;
        }

        return $ok;
    }
619193
public function validate($value)
    {
        $options = array('options' => array(
            'max_range' => $this->max,
            'min_range' => $this->min
        ));

        return empty($value) || (false !== filter_var($value, FILTER_VALIDATE_INT, $options));
    }
393972
public function isValid($value) {
		if (is_int($value) || is_float($value)) {
			return true;
		}
		
		$this->addMessage('Value must be a digital');
		
		return false;
	}
694658
private function validateGreaterThan(): bool
    {
        if ($this->options['min'] !== null) {
            if ($this->options['inclusive'] === false && $this->value <= $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_THAN_MIN);
                return false;
            }

            if ($this->value < $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_OR_EQUAL_TO_MIN);
                return false;
            }
        }
        return true;
    }