I want to add additional field-value pairs to the serializer's validated data
object after the is_valid()
operations are done. How can I do that?
A better approach would be to define a hidden field say, my_hidden_field = serializer.HiddenField(default=None)
in the Serializer class whose value can be obtained in following ways:
validate_my_hidden_field
for it and derive its value based on context.validate
method to derive its value and assign to it.