Validates that the size of an asset is within a range. It's defined specifying the min and max values of that range. min and max are inclusive.
@param null $min
@param null $max
@return $this
331905
function assetFileSize($min = null, $max = null) {
        $range = [];
        if ($min) $range['min'] = $min;
        if ($max) $range['max'] = $max;
        if (count($range)) $this->data['assetFileSize'] = $range;
        return $this;
    }
209097
public static function ruleLenRange($min, $max)
    {
        return function ($input) use ($min, $max) {
            return strlen($input) >= $min && strlen($input) <= $max;
        };
    }
447919
public function toMin(callable $min = null)
    {
        if (null === $min) {
            // can't use min() as $smallest is initially null but actual
            // elements were not checked yet, and min() considers null to always
            // be the minimum value
            $min = function($smallest, $element)
                   {
                       return (null === $smallest || $element < $smallest) ? $element : $smallest;
                   };
        }

        return $this->with($min);
    }
359347
public function setMin(?string $min) : self
    {
        if ($min !== null) {
            $min = Decimal::parse($min);
        }

        $this->min = $min;

        return $this;
    }
207153
public function vLimit(Int $min = 0, Int $max = NULL)
    {
        $key['minchar'] = [':p1' => $min];
        $typ['minchar'] = $min;

        if( $max !== NULL )
        {
            $key['maxchar'] = [':p1' => $max];
            $typ['maxchar'] = $max;
        }

        return $this->onInvalidEventPattern('.{' . $min . ',' . $max . '}', $key, [], $typ);
    }
904223
public function min($min) {
        $this->check_role = 'min';
        $this->p1 = $min;
        $result = $this->value >= $min;
        $this->checkResult($result);
        return $this;
    }
1274418
public function setMin(float $min) : self
    {
        $this->getField()->addAttribute('min', (string) $min);

        return $this;
    }
582168
protected function determineKey($min, $max)
    {
        $minGiven = ($min !== null);
        $maxGiven = ($max !== null);

        if (!$minGiven && !$maxGiven) {
            throw new InvalidArgumentException('You must specify a valid value for min, max or both.');
        }

        if ($minGiven && !$maxGiven) {
            // Open end range.
            return $min . ':';
        } elseif (!$minGiven && $maxGiven) {
            // Open start range.
            return ':' . $max;
        }

        if ($min === $max) {
            // Exact number.
            return $min;
        }

        // Full defined range.
        return $min . ':' . $max;
    }
393815
public function length($min, $max = PHP_INT_MAX)
    {
        return $this->markErrorIf(strlen($this->value) < $min || strlen($this->value) > $max);
    }
368196
public static function isOptionalFloatRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredFloatRange($value, $min, $max);
    }
960950
protected function keep_within($value, $min, $max) {
        if ($value < $min) {
            return $min;
        }
        if ($value > $max) {
            return $max;
        }
        return $value;
    }
297970
public function minMax($min, $max=PHP_INT_MAX){
        return $this->markErrorIf($this->value < $min || $this->value > $max);
    }
167369
public function range($min, $max, $addFilter = true, $forceInt = false)
    {
        if ($addFilter) {
            $this->addFilter(new RangeFilter($min, $max, $forceInt));
        }

        $this->min($min, false)
            ->max($max, false);

        return $this;
    }
131146
public function setImageWidth($minwidth, $maxwidth)
    {
        $this->setImageMin($minwidth, $this->_minheight);
        $this->setImageMax($maxwidth, $this->_maxheight);
        return $this;
    }
1073775
public function havingBetween(string $column, int $min, int $max)
    {
        $this->hConditions()->between(...func_get_args());

        return $this;
    }
1356664
public function setMinMax($min,$max=null)
    {
       $this->min = $min; 
       $this->max = $max; 
    }
784043
public static function range($value, $min, $max): int
    {
        $value = Filter::int($value);
        $min = Filter::int($min);
        $max = Filter::int($max);

        return Vars::limit($value, $min, $max);
    }