validate variable is a number or a numeric string

@param $int
@param $minLength
@param $maxLength
@return bool
774027
private function __validateNumeric($int, $minLength = 1, $maxLength = 0)
    {
        if (!is_numeric($int)) {
            $this->error = 'parameter is not number';
            return false;
        } else if ($maxLength > 0 && strlen($int) > $maxLength) {
            $this->error = 'parameter is too long. number:' . $int;
            return false;
        } else if (strlen($int) < $minLength) {
            $this->error = 'parameter is too short. number:' . $int;
            return false;
        }
        return true;
    }
1044036
public function length($min, $max = null) {
        if (!$this->_isValid) {
            return $this;
        }
        $c = count($this->_unsafeVar);
        if ($c < $min || (null !== $max && $c > $max)) {
            $this->_isValid = false;
        }
        return $this;
    }
962784
public function setMinLength($minLength)
    {
        if ($this->type !== self::TYPE_STRING) {
            throw new \Exception('minLength can only be set on type "string"');
        }

        $this->minLength = (int) $minLength;
    }
516235
protected static function stringLengthBetween(int $min, int $max, RuleInterface $next = null): RuleInterface
    {
        return $next === null ?
            new StringLengthBetween($min, $max) :
            new AndOperator(static::stringLengthBetween($min, $max), $next);
    }
209097
public static function ruleLenRange($min, $max)
    {
        return function ($input) use ($min, $max) {
            return strlen($input) >= $min && strlen($input) <= $max;
        };
    }
302830
public static function isRequiredNumericRange($value, $min, $max)
    {
        return is_numeric($value) && $min <= $value && $max >= $value;
    }
850346
function(a, min, max, allowNumbers, msg) {
    return assert((this.assertStringMinLength(a, min, allowNumbers, msg)&&this.assertStringMaxLength(a, max, allowNumbers, msg)), msg);
  }
1209559
public static function truncate(int $minLength = null, int $maxLength = null)
    {
        if (0 >= $maxLength) {
            throw new \InvalidArgumentException(
                    'Max length must be greater than 0, otherwise truncation doesn\'t make sense'
            );
        }

        $self = new self($minLength, $maxLength);
        $self->allowsTruncate = true;
        return $self;
    }
308886
public static function isString($var, $minLenght = false, $maxLenght = false) {
        if (!is_string($var))
            return false;
        if ($minLenght && strlen($var) < $minLenght)
            return false;
        if ($maxLenght && strlen($var) > $maxLenght)
            return false;
        return true;
    }
960532
public static function integer($min=NULL,$max=NULL,$prompt=NULL){
		if(\is_int($min) && \is_int($max))
			return new Rule("integer[{$min}..{$max}]",$prompt);
		return new Rule("integer",$prompt);
	}
34662
public function range($value, int $min, int $max): bool
    {
        return is_string($value)
            && (mb_strlen($trimmed = trim($value)) >= $min)
            && (mb_strlen($trimmed) <= $max);
    }
1323228
public static function isLength($string = false, $minLength = 0, $maxLength = false) {

        if ($string && strlen($string) >= $minLength) {

            if (!$maxLength || strlen($string) <= $maxLength) {

                return true;
            }
        }

        return false;
    }
988973
public static function minLength($value, int $minLength, string $encoding = 'UTF-8'): bool
    {
        if (!static::isStringCastable($value)) {
            return false;
        }

        $strlen = (int) mb_strlen((string) $value, $encoding);

        return $strlen >= $minLength;
    }
1669
public function isInteger($number, int $min = null, int $max = null): bool
    {
        return isset($min) || isset($max)
            ? filter_var($number, FILTER_VALIDATE_INT, $this->getIntegerOptionsBetween($min, $max))
            : filter_var($number, FILTER_VALIDATE_INT);
    }
968595
public function integerIsBetween(int $integer, int $min, int $max): bool
    {
        return (($integer >= $min) && ($integer <= $max));
    }
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);
    }
193363
public static boolean isLimited(String string, int min, int max) {
        return isNotEmpty(string) && string.length() >= min && string.length() <= max;
    }