def validate(raw):
    """ Checks the content of the data provided by the user.

    Users provide tickers to the application by writing them into a file
    that is loaded through the console interface with the <load filename>
    command.

    We expect the file to be filled with coma separated tickers :class:`string`.

    Parameters:
        - `raw` : :class:`string` content of the user provided file.

    The function strips the raw data from spaces, carrier returns and split the
    content around comas. It will also check if there are trailing comas or if
    the user mistakenly put two comas instead of one between tickers.

    Returns a :class:`list` of sanitized tickers
    """
    tickers = []
    raw = raw.replace(' ', '')                  # remove spaces
    raw = raw.replace('\n', '')                 # removes cr
    for item in raw.split(','):                 # comma split
        if item is not '':
            tickers.append(str(item).upper())
    return tickers