You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting each_item=True to a validator of a nested collection is apparently called recursively for each singleton of the collection, instead of the items of the collection:
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
humm, I guess I think this would be very hard to change and might be wanted, you'd be best to skip each_item=True and do the validation on the whole object.
If that doesn't work for you, what would you propose?
At the very least the documentation should mention the current behavior, it's surely not expected. If backwards compatibility can be broken here, my suggestion would be to make each_item flat and add a new parameter, say flatten, with the current recursive behavior.
Setting
each_item=True
to a validator of a nested collection is apparently called recursively for each singleton of the collection, instead of the items of the collection:Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:The text was updated successfully, but these errors were encountered: