'Must be a int between min and max.'

def int_range(self, key, val, min=None, max=None):

    val = self.type(key, val, int)
    if ((min is not None) and (val < min)):
        raise exceptions.RequestParameterInvalidException('less    than    minimum', key=key, val=val, min=min)
    if ((max is not None) and (val > max)):
        raise exceptions.RequestParameterInvalidException('greater    than    maximum', key=key, val=val, max=max)
    return val
