def validate(payload, schema):
v = jsonschema.Draft4Validator(<EOL>schema, format_checker=jsonschema.FormatChecker())<EOL>error_list = []<EOL>for error in v.iter_errors(payload):<EOL><INDENT>message = error.message<EOL>location = '<STR_LIT:/>' + '<STR_LIT:/>'.join([str(c) for c in error.absolute_path])<EOL>error_list.append(message + '<STR_LIT>' + location)<EOL><DEDENT>return error_list<EOL>
Validate `payload` against `schema`, returning an error list.

    jsonschema provides lots of information in it's errors, but it can be a bit
    of work to extract all the information.