'ValidationError can be passed any object that can be printed (usually
a string), a list of objects or a dictionary.'

def __init__(self, message, code=None, params=None):

    if isinstance(message, dict):
        self.error_dict = message
    elif isinstance(message, list):
        self.error_list = message
    else:
        self.code = code
        self.params = params
        self.message = message
        self.error_list = [self]
