Validate number as is it numeric
511265
public function validateNumeric()
    {
        $val = $this->getValue() + 0;

        return $val >= $this->getArg(0) && $val <= $this->getArg(1);
    }
426131
def is_integer(self, value, strict=False):
        """"""
        if value is not None:
            if isinstance(value, numbers.Number):
                return
        value = stringify(value)
        if value is not None and value.isnumeric():
            return
        self.shout('value %r is not an integer', strict, value)
584973
def validate_digit(value, start, end):
    ''''''
    if not str(value).isdigit() or int(value) < start or int(value) > end:
        raise ValueError('%s must be a digit from %s to %s' % (value, start, end))
1046505
private function validateAlnum(): bool
    {
        $charClass = '[:alnum:]';
        if ($this->options['allow-spaces'] === true) {
            $charClass .= '[:space:]';
        }
        if ($this->options['allow-whitespaces'] === true) {
            $charClass .= '[:blank:]';
        }
        $modifier = '';
        if ($this->options['utf-8'] === true) {
            $modifier = 'u';
        }

        $isValid = \preg_match('/^['.$charClass.']+$/'.$modifier, $this->value) ? true : false;
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_ALNUM_NOT_VALID);

            if ($this->options['allow-whitespaces'] === true && $this->options['allow-spaces'] === true) {
                $this->setError(self::VALIDATOR_ERROR_ALNUM_SPACES_WHITESPACES_NOT_VALID);
            } elseif ($this->options['allow-whitespaces'] === true) {
                $this->setError(self::VALIDATOR_ERROR_ALNUM_WHITESPACES_NOT_VALID);
            } elseif ($this->options['allow-spaces'] === true) {
                $this->setError(self::VALIDATOR_ERROR_ALNUM_SPACES_NOT_VALID);
            }
        }
        return $isValid;
    }
734804
function isNumberString(value) {
    let numberReg = /^((-?\d*\.?\d*(?:e[+-]?\d*(?:\d?\.?|\.?\d?)\d*)?)|(0[0-7]+)|(0x[0-9a-f]+))$/i;
    return lodash.isString(value) && !isEmpty(value) && numberReg.test(value);
}
878011
function( value ) {
			var error;
			if ( !_.isNumber( value ) || _.isNaN( value ) ) {
				error = {
					"rule": "isNumber",
					"message": "ERROR:provided value [" + value + "] is not a number."
				};
				return [ error ];
			}
			return;
		}
236955
function isNumberString(x) {
	return x !== 'Infinity' && x !== 'NaN' && x === String(Math.floor(Number(x)))
}
267661
def validate_number_attribute(self,
                                  attribute: str,
                                  value_type: Union[Type[int], Type[float]] = int,
                                  minimum: Optional[Union[int, float]] = None,
                                  maximum: Optional[Union[int, float]] = None) -> None:
        
        self.add_errors(
            validate_number_attribute(self.fully_qualified_name, self._spec, attribute, value_type,
                                      minimum, maximum))
971590
function isValidLatitude(value) {
    if (value !== null && value !== undefined) {
        if (!isNumber(value)){return false;}
        else if (value > 90 || value < -90) {
            return false;
        }
    }
    return true;
}
1167977
function num(type, value) {
  var val;
  if(type === NUMERIC.INTEGER) {
    val = utils.strtoint(value);
    if(isNaN(val)) throw IntegerRange;
  }else{
    val = utils.strtofloat(value);
    if(isNaN(val)) throw InvalidFloat;
  }
  return val;
}
837691
def IntegerLike(msg=None):
    '''
    
    '''
    def fn(value):
        if not any([
            isinstance(value, numbers.Integral),
            (isinstance(value, float) and value.is_integer()),
            (isinstance(value, basestring) and value.isdigit())
        ]):
            raise Invalid(msg or (
                'Invalid input <{0}>; expected an integer'.format(value))
            )
        else:
            return value
    return fn
273284
def valid(number):
    
    checksum = 0

    number_len = len(number)
    offset = ord('0')

    i = number_len - 1
    while i >= 0:
      n = ord(number[i]) - offset
      checksum += n
      i -= 2

    i = number_len - 2
    while i >= 0:
      n = ord(number[i]) - offset
      n *= 2
      if n > 9:
          n -= 9
      checksum += n
      i -= 2

    return checksum%10 == 0
210230
function validateNumber(node, schema, key) {
    if (isNaN(parseFloat(node)) || !isFinite(node)) {
      throw new ValidationException("Expected number for " + key);
    }
    if (schema[SCHEMAREGEX]) {
      checkRegex(node, schema, key);
    }
  }
1337423
function isNumber( value ) {
	return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf();
}
892619
def validate(self, value: int):
        '''  '''
        if not isinstance(value, int):
            raise ValueError('value is not an integer')

        if self.minimum > value or self.maximum < value:
            msg = (
                '{} is outside the valide range [{},{}]'
            ).format(value, self.minimum, self.maximum)
            raise ValueError(msg)
730166
function isNumeric(input) {
  return input !== undefined
    && input !== null
    && (typeof input === 'number' || parseInt(input, 10) == input);
}
372609
private function validateNumber(): bool
    {
        if ($this->options['require-number'] === true) {
            if (!\preg_match('/[0-9]/', (string)$this->value)) {
                $this->setError(self::VALIDATOR_ERROR_PASSWORD_MUST_CONTAIN_NUMBER);
                return false;
            }
        }
        return true;
    }