def is_in_range(min, max):
    """Validate a number between min and max.

    >>> is_in_range(10, 20)("1")
    False
    >>> is_in_range(10, 20)("10")
    True
    >>> is_in_range(10, 20)("20")
    True
    >>> is_in_range(10, 20)("21")
    False
    >>> is_in_range(10, 20)("hi")
    False
    """
    def is_valid(value):
        try:
            return min <= int(value) <= max
        except:
            return False
    return is_valid