Check the value with min & max length.

@param  string  $value
@param  int     $min
@param  int     $max

@return string
422053
protected static function check($value, $min, $max)
    {
        $length = strlen($value);

        if ($length < $min)
            return self::STATUS_WARNING;

        if ($min <= $length && $length <= $max)
            return self::STATUS_GOOD;

        return self::STATUS_DANGER;
    }
912384
private function isValidResult($number, $min, $max)
    {
        return is_int($number) && $number >= $min && $number <= $max;
    }
993800
public static int checkBetween(int value, int min, int max) {
		if (value < min || value > max) {
			throw new IllegalArgumentException(StrUtil.format("Length must be between {} and {}.", min, max));
		}
		return value;
	}
1208061
protected function _validator_maxlength($input, $value, $max) {
		if (!is_string($value)) return false;
		if (strlen($value) > $max) return false;
		return true;
	}
829327
public function lengthBetween($field, $min, $max, $inclusive = false)
    {
        $fieldValue = strlen(trim($this->get($field)));

        $valid = ($fieldValue <= $max && $fieldValue >= $min);

        if (!$inclusive) {
            $valid = ($fieldValue < $max && $fieldValue > $min);
        }

        return ($valid === true) ?: $this->error($field, __FUNCTION__);
    }
481555
public static function maxLength($value, $length)
    {
        return Validator::string()->length(null, $length)->validate($value);
    }
1325608
private function max($value, $max)
    {
        if (is_string($value)) {
            $value = strlen($value);
        }

        return $value <= $max;
    }
251389
public static function minLength($value, $param)
    {
        $length = is_array($value) ? count($value) : mb_strlen($value);

        return $length >= $param;
    }
539950
protected function min_length($name, $value, $min){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        if(is_string($value) || strval($value)){
            if(strlen($value) < $min){
                $this->add_message($name, 'min_length', array('min' => $min));
                return FALSE;
            }
        }else{
            $this->add_message($name, 'is_string');
            return FALSE;
        }
        return TRUE;
    }
446984
public static function rangeCount($value, int $minCount, int $maxCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        $count = count($value);

        if ($count < $minCount) {
            return false;
        }
        if ($count > $maxCount) {
            return false;
        }

        return true;
    }
302830
public static function isRequiredNumericRange($value, $min, $max)
    {
        return is_numeric($value) && $min <= $value && $max >= $value;
    }
1055075
public static function size($val, $min = null, $max = null): bool
    {
        if (!\is_int($val)) {
            if (\is_string($val)) {
                $val = Helper::strlen(\trim($val));
            } elseif (\is_array($val)) {
                $val = \count($val);
            } else {
                return false;
            }
        }

        return self::integer($val, $min, $max);
    }
668078
public static function isLengthLt($value, $min)
    {
        $value = trim($value);
        if (!is_string($value)) {
            return false;
        }
        $length = function_exists('mb_strlen') ? mb_strlen($value, 'UTF-8') : strlen($value);
        is_array($min) && $min = $min[0];

        if ($min != 0 && $length >= $min) return false;
        return true;
    }
682896
public function str($value, $minLength = 0, $maxLength = false, $default = false)
	{
		$value = trim($value);
		if ((!empty($minLength) && (mb_strlen($value, $this->encoding) < $minLength)) ||
			(!empty($maxLength) && (mb_strlen($value, $this->encoding) > $maxLength))
		) {
			return $default;
		}

		return (string) $value;
	}
281667
public static function length($val, $min, $max = null)
    {
        return isset($val[$min - 1]) && (null === $max || !isset($val[$max]));
    }
357086
public static function int($value, $min = null, $max = null)
    {
        // 最小值
        if(null !== $min && $value < $min)
        {
            return false;
        }
        // 最大值
        if(null !== $max && $value > $max)
        {
            return false;
        }
        // 整数验证
        return ((int)$value) == $value;
    }
1284050
public function vBetween(Int $min = 0, Int $max = 0)
    {
        return $this->setJavascriptValidation
        (
            'ZNValidationBetween', 
            ['betweenBoth' => [':p1' => $min, ':p2' => $max]],
            ['betweenBoth' => [$min, $max]],
            [$min, $max]  
        );
    }