          self.fields = fields
          self.serializer_field = None
          self.message = message or self.message
  
      def set_context(self, serializer):
          """
          This hook is called by the serializer instance,
          prior to the validation call being made.
          """
          # Determine the existing instance, if this is an update operation.
          self.instance = getattr(serializer, 'instance', None)
  
      def enforce_required_fields(self, attrs):
          """
          The `UniqueTogetherValidator` always forces an implied 'required'
          state on the fields it applies to.
          """
          if self.instance is not None:
 
</s> remove     def set_context(self, serializer_field):
        """
        This hook is called by the serializer instance,
        prior to the validation call being made.
        """
        # Determine the underlying model field name. This may not be the
        # same as the serializer field name if `source=<>` is set.
        self.field_name = serializer_field.source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        self.instance = getattr(serializer_field.parent, 'instance', None)

    def filter_queryset(self, value, queryset):
 </s> add     def filter_queryset(self, value, queryset, field_name): </s> remove         if self.instance is not None:
 </s> add         if instance is not None: </s> remove     def __call__(self, attrs):
 </s> add     def __call__(self, attrs, serializer):
        # Determine the underlying model field names. These may not be the
        # same as the serializer field names if `source=<>` is set.
        field_name = serializer.fields[self.field].source_attrs[-1]
        date_field_name = serializer.fields[self.date_field].source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer, 'instance', None)
 </s> remove     def __call__(self, value):
 </s> add     def __call__(self, value, serializer_field):
        # Determine the underlying model field name. This may not be the
        # same as the serializer field name if `source=<>` is set.
        field_name = serializer_field.source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer_field.parent, 'instance', None)

    def enforce_required_fields(self, attrs, instance):
          self.fields = fields
          self.serializer_field = None
          self.message = message or self.message
  
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
    def enforce_required_fields(self, attrs, instance):
          """
          The `UniqueTogetherValidator` always forces an implied 'required'
          state on the fields it applies to.
          """
          if self.instance is not None:
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Drop `set_context()` (#7062)

* Do not persist the context in validators

Fixes encode/django-rest-framework#5760

* Drop set_context() in favour of 'requires_context = True' 
rest_framework/validators.py