title: Django Rest - "serializer.data" is empty dict() even though "serializer" has data with details
body: <p>I was trying to implement password change based on some recommendations on stackoverflow but something was not working which is really weird for me. After troubleshooting I got idea data the my view is not working. Changing serializer actions to print I see data &quot;serializer.data&quot; is result &quot;{}&quot; even though &quot;print(serializer)&quot; give result.</p>
  <p>serializers.py</p>
  <pre><code>class ChangePasswordSerializer(serializers.Serializer):
      old_password = serializers.CharField(max_length=128, write_only=True, required=True)
      new_password1 = serializers.CharField(
          max_length=128, write_only=True, required=True
      )
      new_password2 = serializers.CharField(
          max_length=128, write_only=True, required=True
      )
  
      def validate_old_password(self, value):
          user = self.context[&quot;request&quot;].user
          if not user.check_password(value):
              raise serializers.ValidationError(
                  {
                      &quot;old_passowrd&quot;: _(
                          &quot;Your old password was entered incorrectly. Please enter it again.&quot;
                      )
                  }
              )
          return value
  
      def validate(self, data):
          if data[&quot;new_password1&quot;] != data[&quot;new_password2&quot;]:
              raise serializers.ValidationError(
                  {&quot;new_password2&quot;: _(&quot;The two password fields didn't match.&quot;)}
              )
          validate_password(data[&quot;new_password1&quot;], self.context[&quot;request&quot;].user)
          return super().validate(data)
  </code></pre>
  <p>views.py</p>
  <pre><code>class ChangePassword(UpdateAPIView):
      serializer_class = ChangePasswordSerializer
      permission_classes = [IsAuthenticated]
  
      def get_object(self, queryset=None):
          return self.request.user
  
      def update(self, request, *args, **kwargs):
          self.object = self.get_object()
          serializer = self.get_serializer(data=request.data)
          if serializer.is_valid(raise_exception=True):
              # user.set_password(serializer.data.get(&quot;new_password1&quot;))
              # user.save()
              print(serializer.data)
              return Response(&quot;Success&quot;, status=status.HTTP_204_NO_CONTENT)
          return Response(serializer.errors, status.HTTP_400_BAD_REQUEST)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/GTjF2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GTjF2.png" alt="Print(serializer.data)" /></a></p>
  <p><a href="https://i.stack.imgur.com/vXGTs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vXGTs.png" alt="Print(serializer)" /></a></p>