title: Django rest framework:UniqueValidator copare the field convert to upper case
body: <p>I can save the <code>mac_address</code> to upper in database<br>
  And the <code>mac_address</code> value should be unique in database  </p>
  
  <p>But if the client send me a lower case json like <code>{"mac_address":'aa:bb:cc:dd:eE'}</code><br>
  and my database already had <code>mac_address</code> with <code>'AA:BB:CC:DD:EE'</code><br>
  But client still got <code>201 created success</code><br>
  Why wouldn't my <code>UniqueValidator</code> work ??<br>
  Please help me find out  </p>
  
  <p>views.py  </p>
  
  <p>I try <code>ListCreateAPIView</code> and <code>APIView</code><br>
  Both can't work well   I think the problem is <code>UniqueValidator</code> part  </p>
  
  <p>I find the <a href="http://www.django-rest-framework.org/api-guide/serializers/#validation" rel="nofollow">document</a>  use <code>validate_&lt;field_name&gt;</code>  But My code not work </p>
  
  <pre><code>class DataList(generics.ListCreateAPIView):
      queryset = Data.objects.all()
      serializer_class = DataSerializer
  
      def perform_create(self, serializer):
          mac_address = self.request.data['mac_address'].upper()
          serializer.save(mac_address=mac_address, datetime=datetime.datetime.now(pytz.utc))
  class DataList(APIView):
      def post(self, request, format=None):
          serializer = DataSerializer(data=request.data)
          if serializer.is_valid():
              mac_address = request.data['mac_address'].upper()
              serializer.save(mac_address=mac_address, datetime=datetime.datetime.utcnow().replace(tzinfo=pytz.utc))
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>And the serialize validator needs to convert to lower case first then query the database.</p>
  
  <pre><code>class DataSerializer(serializers.ModelSerializer):
      datetime = ReadOnlyField()
      mac_address = CharField(max_length=50,
      validators=[UniqueValidator(queryset=Data.objects.all())]
  )
      def validate_mac_address(self,value):
          return value.upper()
  </code></pre>