Determine if the value is greater than `min` if set, and less than `max` if set.

@param string $key The data key.
@param mixed $value The data value.

@return boolean
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;

    }
1018752
protected function conditionalSet($key, $value)
    {
        if (!$this->has($key)) {
            $this->set($key, $value);
        }
    }
496762
public function isLength($value, $parameter)
    {
        $min = $parameter[0];
        $max = $parameter[1];
        if ($min != 0 && strlen($value) < $min) {
            return false;
        }
        if ($max != 0 && strlen($value) > $max) {
            return false;
        }

        return true;
    }
726675
public function ruleValue($value = null)
    {
        if (\func_num_args() > 0) {
            if (null !== $value && $this->validateValue($value)) {
                $this->value = $value;
                $this->updateBound();

                return true;
            }
            return false;
        }
        return $this->value;
    }
659397
protected function validateParameter($key, $value)
    {
        if ($this->isSafeValue($value)) {
            return true;
        }

        $this->enforceNonObjectValue($key, $value);
        $this->enforceMultidimensionalArrayOfScalars($key, $value);

        return true;
    }
408918
public function validate($value = "")
    {
        if (is_null($value) && $this->isEmptyAllowed()) {
            return true;
        }

        if ($this->isNullNotAllowed() && is_null($value)) {
            return false;
        }

        return true;
    }
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;
        }
    }
1325608
private function max($value, $max)
    {
        if (is_string($value)) {
            $value = strlen($value);
        }

        return $value <= $max;
    }
381300
protected function isSoftSmall($value)
    {
        if (!is_scalar($value) || $value === null) {
            return false;
        }
        
        $value = (float) $value;
        
        return $value >= 0 && $value <= 9;
    }
200611
public function rule_max( $key, $value, $max )
	{
		return $this->rule_max_num( $key, strlen( $value ), $max );
	}
1308564
public function search($key, $value)
	{
		foreach ($this->rows as $row)
		{
			if ($row->$key == $value)
			{
				return true;
			}
		}

		return false;
	}
496179
public static function isOptionalIntegerRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredIntegerRange($value, $min, $max);
    }
119508
public function set(string $key, $value): bool
    {
        if (is_string($key) === false || $key === "") {
            return false;
        }

        $this->_configValues[$key] = $value;
        return true;
    }
1253369
public function increment($key, $value = 1)
    {
        $cached = $this->get($key);

        if (is_numeric($cached)) {
            $cached += $value;
            $this->set($key, $cached);
			return $cached;
		}

        return false;
    }
404545
public function andBetween($key, $min, $max)
    {
        $value = sprintf('%s BETWEEN ? AND ?', $key);
        return $this->andAdd($value, [$min, $max]);
    }
1347357
public static function isGt($value, $max)
    {
        is_array($max) && $max = $max[0];
        if (!is_numeric($value)) {
            return false;
        } elseif (function_exists('bccomp')) {
            return bccomp($value, $max, 14) == 1;
        } else {
            return $value > $max;
        }
    }
635908
final public function isPrimaryKeyValue($value)
    {
        $column = $this->getPk();

        return (bool) $this->db->select($column)
                               ->from(static::getTableName())
                               ->whereEquals($column, $value)
                               ->query($column);
    }