Raising a list of ValidationErrors loses by detail by omitting the code of each individual ValidationError #9459
Unanswered
PureTryOut
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a serializer that validates multiple fields together which means they are validated in a generic
validate()
function.See this example:
I would assume that when checking the errors after validating (
serializer.errors["non_field_errors"]
) these include the custom codes I passed along, but they don't. Instead these are reset to the defaultinvalid
, but that makes it hard to test that the right errors are returned.Beta Was this translation helpful? Give feedback.
All reactions