code: def validate_type_only(self, val):
          
          # Since the definition maintains the list of fields for serialization,
          # we're okay with a subclass that might have extra information. This
          # makes it easier to return one subclass for two routes, one of which
          # relies on the parent class.
          if not isinstance(val, self.definition):
              raise ValidationError('expected type %s, got %s' %
                  (self.definition.__name__, generic_type_name(val)))
docs: Use this when you only want to validate that the type of an object
          is correct, but not yet validate each field.