code: def validate_rtype(self, value):
          
  
          if not value or value != self.rtype:
              msg = self.messages['rtype'].format(self.rtype, value)
              raise ValidationError(msg)
          return value
docs: Schematics validator
  
          The provided rtype must match that of the
          underlying model.
  
          :return: str