Validate integer.
7064
protected void validateInteger(String field, String errorKey, String errorMessage) {
		validateIntegerValue(controller.getPara(field), errorKey, errorMessage);
	}
514217
def validate_float(cls, value):
        
        if not isinstance(value, (int, float)):
            raise TypeError(
                "value must be a number, got %s" % type(value)
            )
1101139
def _validated(self, values):
        """"""
        if self.length != len(values):
            raise NotValid(
                "%r does not have exactly %d values. (Got %d.)" % (
                    values, self.length, len(values)))
        return type(self.schemas)(
            self.schemas[i].validate(v) for i, v in enumerate(values))
1305555
protected void validateEqualInteger(Integer i1, Integer i2, String errorKey, String errorMessage) {
		if (i1 == null || i2 == null || (i1.intValue() != i2.intValue())) {
			addError(errorKey, errorMessage);
		}
	}
129817
def is_valid(number):
    """"""
    n = str(number)
    if not n.isdigit():
        return False
    return int(n[-1]) == get_check_digit(n[:-1])
43450
def clean_int(x) -> int:
    
    try:
        return int(x)
    except ValueError:
        raise forms.ValidationError(
            "Cannot convert to integer: {}".format(repr(x)))
1348910
def check(self, value, major):
        
        if self._min is not None and value < self._min:
            raise ValueError("Integer %d is lower than minimum %d."
                             % (value, self._min))
        if self._max is not None and value > self._max:
            raise ValueError("Integer %d is higher than maximum %d."
                             % (value, self._max))
418059
def validate(self, raw_data, **kwargs):
        
        try:
            converted_data = int(raw_data)
            return super(IntegerField, self).validate(converted_data)
        except ValueError:
            raise ValidationException(self.messages['invalid'], repr(raw_data))
852713
def validate_image(image, number_tiles):
    """"""
    TILE_LIMIT = 99 * 99

    try:
        number_tiles = int(number_tiles)
    except:
        raise ValueError('number_tiles could not be cast to integer.')

    if number_tiles > TILE_LIMIT or number_tiles < 2:
        raise ValueError('Number of tiles must be between 2 and {} (you \
                          asked for {}).'.format(TILE_LIMIT, number_tiles))
39343
def check_int(**params):
    
    for p in params:
        if not isinstance(params[p], numbers.Integral):
            raise ValueError(
                "Expected {} integer, got {}".format(p, params[p]))
961546
def validate(self, value):
        
        try:
            # trap blank fields here
            if not self.blank or value:
                v = int(value)
                if v < 0:
                    return None
            return value
        except ValueError:
            return None
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")
887193
def validate(self, instance, value):
        """"""
        if self.cast:
            value = bool(value)
        if not isinstance(value, BOOLEAN_TYPES):
            self.error(instance, value)
        return value
234772
def validate(self, value):
        """"""
        value = self.pre_validate(value)
        if not self._typecheck(value):
            raise ValueError('%r failed type check' % value)
        return value
726555
def validate_integer(option, value):
    
    if isinstance(value, integer_types):
        return value
    elif isinstance(value, string_type):
        try:
            return int(value)
        except ValueError:
            raise ValueError("The value of %s must be "
                             "an integer" % (option,))
    raise TypeError("Wrong type for %s, value must be an integer" % (option,))
198797
function validateNumericality(attr, conf, err) {
    if (nullCheck.call(this, attr, conf, err)) return;

    if (typeof this[attr] !== 'number') {
        return err('number');
    }
    if (conf.int && this[attr] !== Math.round(this[attr])) {
        return err('int');
    }
}
816854
def __validInputs(self):
        """"""
        #if not isinstance(self.__column, Column):
        #    raise Sitools2Exception("column must be an instance of Column")
        try:
            float(self.__minVal)
        except ValueError as ex:
            raise Sitools2Exception(ex)
        try:
            float(self.__maxVal)
        except ValueError as ex:
            raise Sitools2Exception(ex)
        
        if float(self.__minVal) >= float(self.__maxVal):
            raise Sitools2Exception("maxVal must be superior to minVal")