def get_user_input(validation_function, defaut=''):
    """
    Asks user for input and checks if it is valid by validating with
    validation function.

    :param: validation_function: function on which the user input is validated
        against
    :type validation_function: function
    :param defaut: default return value
    :type defaut: str
    :return: user input
    :rtype: str
    """

    while True:
        try:
            user_input = input()
            corrected_value = validation_function(user_input)
            if corrected_value:
                return corrected_value
            else:
                continue
        except Exception as e:
            raise e