Whole-positive-integer validator.
321854
function validatorNum( msg ) {
		return function() {
			var value = this.getValue(),
				pass = !!( CKEDITOR.dialog.validate.integer()( value ) && value > 0 );

			if ( !pass ) {
				alert( msg );
				this.select();
			}

			return pass;
		};
	}
986687
def validate(self, instance, value):
        """"""
        try:
            intval = int(value)
            if not self.cast and abs(value - intval) > TOL:
                self.error(
                    instance=instance,
                    value=value,
                    extra='Not within tolerance range of {}.'.format(TOL),
                )
        except (TypeError, ValueError):
            self.error(instance, value, extra='Cannot cast to integer.')
        _in_bounds(self, instance, intval)
        return intval
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)
1305555
protected void validateEqualInteger(Integer i1, Integer i2, String errorKey, String errorMessage) {
		if (i1 == null || i2 == null || (i1.intValue() != i2.intValue())) {
			addError(errorKey, errorMessage);
		}
	}
1151365
def Validate(self):
    """"""
    ValidateMultiple(self.probe, "Method has invalid probes")
    Validate(self.target, "Method has invalid target")
    Validate(self.hint, "Method has invalid hint")
781542
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var offset = parseInt('' + args[1]);
  if(isNaN(offset) || offset < 0 || offset > Constants.MAX_BIT_LEN) {
    throw IntegerRange;
  }
  args[1] = offset;
}
536413
def _check_inputs(z, m):
    """"""
    try:
        nz = len(z)
        z = np.array(z)
    except TypeError:
        z = np.array([z])
        nz = len(z)
    try:
        nm = len(m)
        m = np.array(m)
    except TypeError:
        m = np.array([m])
        nm = len(m)

    if (z < 0).any() or (m < 0).any():
        raise ValueError('z and m must be positive')

    if nz != nm and nz > 1 and nm > 1:
        raise ValueError('z and m arrays must be either equal in length, \
                          OR of different length with one of length 1.')

    else:
        if type(z) != np.ndarray:
            z = np.array(z)
        if type(m) != np.ndarray:
            m = np.array(m)

        return z, m
1197886
function checkNumberOrInterpolation(i) {
  const start = i;
  let l;

  while (i < tokensLength) {
    if (l = checkInterpolation(i) || checkNumber(i)) i += l;
    else break;
  }

  return i - start;
}
1005526
def is_valid_shape(value):
    """"""
    if is_int_positive(value):
        return True, value
    elif isinstance(value, tuple) or isinstance(value, list):
        for v in value:
            if not is_int_positive(v):
                return False, value
        return True, value
    else:
        return False, value
988470
def positive_integer(value):
    
    try:
        value = int(value)
    except Exception:
        raise argparse.ArgumentTypeError('Invalid int value: \'{}\''.format(value))
    if value < 0:
        raise argparse.ArgumentTypeError('Invalid positive int value: \'{}\''.format(value))
    return value
1262983
def numberp(v):
    """"""
    return (not(isinstance(v, bool)) and
            (isinstance(v, int) or isinstance(v, float)))
41965
def positiveints(value):
    
    ints = integers(value)
    for val in ints:
        if val < 0:
            raise ValueError('%d is negative in %r' % (val, value))
    return ints
269281
def value_validate(self, value):
        
        if not isinstance(value, six.integer_types):
            raise tldap.exceptions.ValidationError("should be a integer")

        try:
            return str(value)
        except (TypeError, ValueError):
            raise tldap.exceptions.ValidationError("is invalid integer")
384399
def p_ConstValue_integer(p):
  """"""
  p[0] = model.Value(type=model.Value.INTEGER, value=p[1])
90680
def is_int(value):
    """"""
    if isinstance(value, bool):
        return False
    try:
        int(value)
        return True
    except (ValueError, TypeError):
        return False
885556
def validate_non_negative_integer(option, value):
    
    val = validate_integer(option, value)
    if val < 0:
        raise ValueError("The value of %s must be "
                         "a non negative integer" % (option,))
    return val
622145
def pad_positive_wrapper(fmtfct):
    """"""

    def check_and_append(*args, **kwargs):
        result = fmtfct(*args, **kwargs)
        if fmtfct.parens and not result.endswith(')'):
            result += ' '
        return result

    return check_and_append