def valid_year(entry, minimum, maximum):
    """Validate four digit year entries."""
    if len(entry) > 4:
        return False
    elif int(entry) >= minimum and int(entry) <= maximum:
        return True
    else:
        return False