def valid_string_int(text, minimum=None, maximum=None):
    """Validate string representative of integer.
    Returns True if it is a valid integer and between the minimum and maximum value."""
    if not text.isdigit():
        return False

    text = int(text)

    if minimum is not None and maximum is not None:
        if text not in range(minimum, maximum + 1):
            return False
    elif minimum is None and maximum is None:
        return True
    elif minimum is not None:
        if text >= minimum:
            return True
    elif maximum is not None:
        if text <= maximum:
            return True

    return True