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
I am trying to replace a model with a default model in case validation fails. But I would like to customize the default model based on the error message.
For this I am using with_default_schema and am trying to pass data to default_factory.
My Question: How to pass the validation error to the default_factory of with_default_schema?
Minimal Example:
The Minimal Example validates an Item and calls error_handler because of a validation error. This part works. However from the docs it is not clear how to pass anything to the error_handler. context is simply None.
I am trying to replace a model with a default model in case validation fails. But I would like to customize the default model based on the error message.
For this I am using with_default_schema and am trying to pass data to
default_factory
.My Question: How to pass the validation error to the
default_factory
ofwith_default_schema
?Minimal Example:
The Minimal Example validates an
Item
and callserror_handler
because of a validation error. This part works. However from the docs it is not clear how to pass anything to theerror_handler
.context
is simplyNone
.System:
2.10.3
3.12.3
24.04
The text was updated successfully, but these errors were encountered: