@param string|null $min The minimum value, or null to remove it.

@return NumberValidator

@throws \InvalidArgumentException If not a valid number.
359347
public function setMin(?string $min) : self
    {
        if ($min !== null) {
            $min = Decimal::parse($min);
        }

        $this->min = $min;

        return $this;
    }
508154
public function setMin(string $min)
    {
        $this->doSetMin($min);
        $this->getTag()->setAttribute('min', $min);

        return $this;
    }
1321748
public function min($value)
    {
        $v = $this->type('numeric')->value();

        if (is_null($v)) {
            return $this;
        }

        if ($v < $value) {
            throw new \Intervention\Image\Exception\InvalidArgumentException(
                sprintf('Argument %d must be at least %s.', $this->key, $value)
            );
        }

        return $this;
    }
1010330
public static function validate($mobileNumber)
    {
        $mobileNumber = Msisdn::clean($mobileNumber);

        return ! empty($mobileNumber) &&
        strlen($mobileNumber) === 10 &&
        is_numeric($mobileNumber);
    }
1371293
public function min($min = null, $addFilter = true, $forceInt = false)
    {
        if ($addFilter) {
            $this->addFilter(new RangeFilter($min, null, $forceInt));
        }

        return $this->attr('min', $min);
    }
153555
public function validateMin($amount)
    {
        $this->validator_attributes[] = 'data-parsley-min="' . (float)$amount . '"';

        $this->validator_checks['min'] = (float)$amount;

        return $this;
    }
579589
public function setRange($min, $max)
	{
		$min = filter_var($min, FILTER_VALIDATE_INT);
		$max = filter_var($max, FILTER_VALIDATE_INT);

		if ($min === false)
		{
			throw new InvalidArgumentException('Argument 1 passed to ' . __METHOD__ . ' must be an integer');
		}

		if ($max === false)
		{
			throw new InvalidArgumentException('Argument 2 passed to ' . __METHOD__ . ' must be an integer');
		}

		if ($min > $max)
		{
			throw new InvalidArgumentException('Invalid range: min (' . $min . ') > max (' . $max . ')');
		}

		$this->vars['min'] = $min;
		$this->vars['max'] = $max;
	}
76075
protected static function validateInputNumber($number)
    {
        if ($number instanceof static) {
            return $number->getNumber();
        }

        $number = trim($number);
        if (!static::isNumber($number)) {
            throw new \InvalidArgumentException('Argument number is not valid');
        }

        return $number;
    }
1064054
public function length($min, $max = null) {
        if (!$this->_isValid) {
            return $this;
        }
        $length = mb_strlen($this->_unsafeVar, $this->conf['encoding']);
        if ($length < $min || (!is_null($max) && $length > $max)) {
            $this->_isValid = false;
        }
        return $this;
    }
348958
protected function _validator_min($input, $value, $min) {
		if (!is_string($value) && !is_integer($value) && !is_float($value)) return false;
		if (is_string($value)) $value = (int)$value;
		return $value >= $min;
	}
1342742
public static function isBetween($value, $min, $max, $inclusive = false)
    {
        \settype($value, 'int');
        \settype($min, 'int');
        \settype($max, 'int');

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

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

        return (($value >= $min) && ($value <= $max));
    }
1256924
public function min(...$numbers)
    {
        foreach ($numbers as $number) {
            if (bccomp(static::validateInputNumber($number), $this->number, $this->precision) === -1) {
                $this->number = $number;
            }
        }

        return $this;
    }
918645
protected function validate_int( $var, $min = null, $max = null ) {
		if ( ! is_int( $var ) && ! is_string( $var ) && empty( $var ) ) {
			return new \WP_Error( 400, $this->app->translate( 'Value is required.' ) );
		}
		if ( ! is_int( $var ) && ( ! is_string( $var ) || ! preg_match( '#\A-?\d+\z#', $var ) ) ) {
			return new \WP_Error( 400, $this->app->translate( 'Invalid format.' ) );
		}
		if ( isset( $min ) && $var < $min ) {
			return new \WP_Error( 400, $this->app->translate( 'Outside the range of allowed values.' ) );
		}
		if ( isset( $max ) && $var > $max ) {
			return new \WP_Error( 400, $this->app->translate( 'Outside the range of allowed values.' ) );
		}

		return true;
	}
1263713
public static function ints(int $min, int $max, int $n = 10) : array
    {
        if (($max - $min) < 0) {
            throw new InvalidArgumentException('Maximum cannot be'
                . ' less than minimum.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate less'
                . ' than 1 parameter.');
        }

        if ($n > ($max - $min + 1)) {
            throw new InvalidArgumentException('Cannot generate more'
                . ' unique integers than in range.');
        }

        $distribution = [];

        while (count($distribution) < $n) {
            $r = rand($min, $max);

            if (!in_array($r, $distribution)) {
                $distribution[] = $r;
            }
        }

        return $distribution;
    }
1114455
public function validate(...$params)
    {
        list($name, $value, $min, $max, $throws, $template) = $params;

        return ValidatorHelper::validateInteger($name, $value, $min, $max, $throws, $template);
    }
243260
public function _validation_numeric_min($val, $min_val)
	{
		return $this->_empty($val) || floatval($val) >= floatval($min_val);
	}
1264316
public function min(\DateTimeInterface $min)
    {
        $min = $this->processDateTime($min);

        return $this->attr(DateTimeTypeBase::ATTR_MIN, $min);
    }