      def __init__(self, queryset):
          self.queryset = queryset
          self.serializer_field = None
  
      def __call__(self, value):
          field = self.serializer_field
  
          # Determine the model field name that the serializer field corresponds to.
          field_name = field.source_attrs[0] if field.source_attrs else field.field_name
  
          # Determine the existing instance, if this is an update operation.
          instance = getattr(field.parent, 'instance', None)
  
          # Ensure uniqueness.
          filter_kwargs = {field_name: value}
 
</s> remove         instance = getattr(field.parent, 'instance', None)
 </s> add         self.instance = getattr(serializer_field.parent, 'instance', None) </s> remove     def __call__(self, value):
        serializer = self.serializer_field

 </s> add     def set_context(self, serializer): </s> remove         instance = getattr(serializer, 'instance', None)
 </s> add         self.instance = getattr(serializer, 'instance', None) </s> remove     # Validators with `requires_context` will have the field instance
    # passed to them when the field is instantiated.
    requires_context = True
 </s> add  </s> remove         filter_kwargs = {field_name: value}
 </s> add         filter_kwargs = {self.field_name: value}
    def set_context(self, serializer_field):
        # 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[0]
      def __init__(self, queryset):
          self.queryset = queryset
          self.serializer_field = None
  
    def set_context(self, serializer_field):
        # 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[0]
    def set_context(self, serializer_field):
        # 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[0]
    def set_context(self, serializer_field):
        # 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[0]
    def set_context(self, serializer_field):
        # 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[0]
    def set_context(self, serializer_field):
        # 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[0]
    def set_context(self, serializer_field):
        # 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[0]
          # Determine the existing instance, if this is an update operation.
          instance = getattr(field.parent, 'instance', None)
  
          # Ensure uniqueness.
          filter_kwargs = {field_name: value}
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 First pass at unique_for_date, unique_for_month, unique_for_year 
rest_framework/validators.py