      def test_field_validation(self):
  
          class CommentSerializerWithFieldValidator(CommentSerializer):
  
              def clean_content(self, attrs, source):
                  value = attrs[source]
                  if "test" not in value:
                      raise serializers.ValidationError("Test not in value")
                  return attrs
  
 
</s> remove         Run clean_<fieldname> validators on the serializer
 </s> add         Run validate_<fieldname> methods on the serializer </s> remove                 clean_method = getattr(self, 'clean_%s' % field_name, None)
 </s> add                 clean_method = getattr(self, 'validate_%s' % field_name, None)
            def validate_content(self, attrs, source):
      def test_field_validation(self):
  
          class CommentSerializerWithFieldValidator(CommentSerializer):
  
            def validate_content(self, attrs, source):
                  value = attrs[source]
                  if "test" not in value:
                      raise serializers.ValidationError("Test not in value")
                  return attrs
  
keep keep keep keep replace keep keep keep keep keep
 Switch from clean_<fieldname> to validate_<fieldname>, clarify documentation 
rest_framework/tests/serializer.py