  
  class UniqueForMonthValidator(BaseUniqueForValidator):
      message = _('This field must be unique for the "{date_field}" month.')
  
      def get_filter_kwargs(self, attrs):
          value = attrs[self.field]
          date = attrs[self.date_field]
  
          filter_kwargs = {}
          filter_kwargs[self.field_name] = value
 
</s> remove     def get_filter_kwargs(self, attrs):
 </s> add     def filter_queryset(self, attrs, queryset): </s> remove     def get_filter_kwargs(self, attrs):
 </s> add     def filter_queryset(self, attrs, queryset): </s> remove         return filter_kwargs
 </s> add         return queryset.filter(**filter_kwargs) </s> remove         return filter_kwargs
 </s> add         return queryset.filter(**filter_kwargs) </s> remove         return filter_kwargs
 </s> add         return queryset.filter(**filter_kwargs)
    def filter_queryset(self, attrs, queryset):
  
  class UniqueForMonthValidator(BaseUniqueForValidator):
      message = _('This field must be unique for the "{date_field}" month.')
  
    def filter_queryset(self, attrs, queryset):
          value = attrs[self.field]
          date = attrs[self.date_field]
  
          filter_kwargs = {}
          filter_kwargs[self.field_name] = value
keep keep keep keep replace keep keep keep keep keep
 Uniqueness constraints imply a forced 'required=True'. Refs #1945 
rest_framework/validators.py