          if qs_exists(queryset):
              raise ValidationError(self.message, code='unique')
  
      def __repr__(self):
          return unicode_to_repr('<%s(queryset=%s)>' % (
              self.__class__.__name__,
              smart_repr(self.queryset)
          ))
  
  
 
</s> remove         return unicode_to_repr('<%s(queryset=%s, fields=%s)>' % (
 </s> add         return '<%s(queryset=%s, fields=%s)>' % ( </s> remove         ))
 </s> add         ) </s> remove         return unicode_to_repr('<%s(queryset=%s, field=%s, date_field=%s)>' % (
 </s> add         return '<%s(queryset=%s, field=%s, date_field=%s)>' % ( </s> remove         return unicode_to_repr('<%s value=%s errors=%s>' % (
 </s> add         return '<%s value=%s errors=%s>' % ( </s> remove         ))
 </s> add         )
        return '<%s(queryset=%s)>' % (
          if qs_exists(queryset):
              raise ValidationError(self.message, code='unique')
  
      def __repr__(self):
        return '<%s(queryset=%s)>' % (
              self.__class__.__name__,
              smart_repr(self.queryset)
          ))
  
  
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/validators.py