          """
          The `UniqueTogetherValidator` always forces an implied 'required'
          state on the fields it applies to.
          """
          if self.instance is not None:
              return
  
          missing_items = {
              field_name: self.missing_message
              for field_name in self.fields
 
</s> remove     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):
 </s> add     def enforce_required_fields(self, attrs, instance): </s> remove                     attrs[field_name] = getattr(self.instance, field_name)
 </s> add                     attrs[field_name] = getattr(instance, field_name) </s> remove         if self.instance is not None:
 </s> add         if instance is not None: </s> remove     def exclude_current_instance(self, attrs, queryset):
 </s> add     def exclude_current_instance(self, attrs, queryset, instance):
        if instance is not None:
          """
          The `UniqueTogetherValidator` always forces an implied 'required'
          state on the fields it applies to.
          """
        if instance is not None:
              return
  
          missing_items = {
              field_name: self.missing_message
              for field_name in self.fields
keep keep keep keep 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