-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
I am looking for a way to disable validation on a serializer in a nested way.
For example wth this code:
class SerializerTwo(serializers.Serializer):
value_two = serializers.CharField()
class SerializerOne(serializers.Serializer):
value_one = serializers.CharField()
nested_value = AnotherSerializer(required=False)
I want to be able to post data of the form
{
value_one: "abc",
value_two: {
// this shouldn't matter
}
}
And not receive any validation errors no matter on how I set up the validation. I want this because I wrote my own validation methods that are shared with another part of the codebase. Hence, I don't want DRF interfering with that flow.
Metadata
Metadata
Assignees
Labels
No labels