I have a serializer that validates fields based on the values of other fields, In the error response I would like to show each field error as a field error as opposed to showing
I figured it out, on this page of the documentation in the "BaseSerializer" section, there's an example that shows ValidationError can take a dictionary argument upon initialization.
If I raise ValidationError({'field_val1': ['this field is not valid']}) I get the JSON response I want.