-
-
Save jonashaag/05d8147beb20681b22eb5fbd5d1d5b33 to your computer and use it in GitHub Desktop.
pydantic raise model_validator ValidationError on custom field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raise ValidationError.from_exception_data( | |
"test", | |
[ | |
InitErrorDetails( type='value_error', loc=(field_name,), input=None, ctx={"error": "my message"}) | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment