Level-field validation in django rest framework 3.1 - access to the old value
问题 Before updating object the title field is validated. How to access data of serialized object in order to compare value with older value of this object? from rest_framework import serializers class BlogPostSerializer(serializers.Serializer): title = serializers.CharField(max_length=100) content = serializers.CharField() def validate_title(self, value): """ Check that the blog post is about Django. """ if 'django' not in value.lower(): raise serializers.ValidationError("Blog post is not about