from rest_framework.exceptions import ValidationError
def to_representation(self, request_data):
raise ValidationError({
'field_name': ["Field not allowed to change"]
})
In the example above how can I throw multiple validation errors? I want to throw them as dicts to show at the respective fields.
You throw one ValidationError with multiple fields errors inside: