Skip to content

How to validate a Pydantic model which represents a list of model instances ? #292

Answered by yedpodtrzitko
jossefaz asked this question in Q&A
Discussion options

You must be logged in to vote

@jossefaz from the traceback in first message looks like outdated version of request_validation(). So either you have overriden it based on code from some older release, or the version you have installed isnt really 1.1.0. The default function has changed noticably (notice for example the form.parse_obj() which is absent in your traceback).

def request_validation(self, request, query, json, form, headers, cookies):
"""
req_query: werkzeug.datastructures.ImmutableMultiDict
req_json: dict
req_headers: werkzeug.datastructures.EnvironHeaders
req_cookies: werkzeug.datastructures.Immut…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kemingy
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by yedpodtrzitko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants