docs: def normalize_val(self, request, val):
          """This will take the value and make sure it meets expectations
  
          :param request: the current request instance
          :param val: the raw value pulled from kwargs or args
          :returns: val that has met all param checks
          :raises: ValueError if val fails any checks
          """
          flags = self.flags
          paction = flags['action']
          ptype = flags['type']
          pchoices = flags.get('choices', None)
          allow_empty = flags.get('allow_empty', False)
          min_size = flags.get('min_size', None)
          max_size = flags.get('max_size', None)
          regex = flags.get('regex', None)
  
          if paction in set(['store_list']):
              if isinstance(val, list) and len(val) > 1:
                  raise ValueError("too many values for param")
  
              if isinstance(val, basestring):
                  val = list(val.split(','))
  
              else:
                  val = list(val)
  
          elif paction in set(['append', 'append_list']):
              if not isinstance(val, list):
                  val = [val]
  
              if paction == 'append_list':
                  vs = []
                  for v in val:
                      if isinstance(v, basestring):
                          vs.extend(v.split(','))
                      else:
                          vs.append(v)
  
                  val = vs
  
          else:
              if paction not in set(['store', 'store_false', 'store_true']):
                  raise RuntimeError('unknown param action {}'.format(paction))
  
          if regex:
              failed = False
              if isinstance(regex, basestring):
                  if not re.search(regex, val): failed = True
              else:
                  if not regex.search(val): failed = True
  
              if failed:
                  raise ValueError("param failed regex check")
  
          if ptype:
              if isinstance(val, list) and ptype != list:
                  val = list(map(ptype, val))
  
              else:
                  if isinstance(ptype, type):
                      if issubclass(ptype, bool):
                          if val in set(['true', 'True', '1']):
                              val = True
                          elif val in set(['false', 'False', '0']):
                              val = False
                          else:
                              val = ptype(val)
  
                      elif issubclass(ptype, str):
                          charset = request.encoding
                          if is_py2:
                              val = ptype(ByteString(val, charset))
                          else:
                              val = ptype(String(val, charset))
  
  #                         if charset and isinstance(val, unicode):
  #                             val = val.encode(charset)
  #                         else:
  #                             val = ptype(val)
  
                      else:
                          val = ptype(val)
  
                  else:
                      val = ptype(val)
  
          if pchoices:
              if isinstance(val, list) and ptype != list:
                  for v in val:
                      if v not in pchoices:
                          raise ValueError("param value {} not in choices {}".format(v, pchoices))
  
              else:
                  if val not in pchoices:
                      raise ValueError("param value {} not in choices {}".format(val, pchoices))
  
          # at some point this if statement is just going to be too ridiculous
          # FieldStorage check is because of this bug https://bugs.python.org/issue19097
          if not isinstance(val, cgi.FieldStorage):
              if not allow_empty and val is not False and not val:
                  if 'default' not in flags:
                      raise ValueError("param was empty")
  
          if min_size is not None:
              failed = False
              if isinstance(val, (int, float)):
                  if val < min_size: failed = True
              else:
                  if len(val) < min_size: failed = True
  
              if failed:
                  raise ValueError("param was smaller than {}".format(min_size))
  
          if max_size is not None:
              failed = False
              if isinstance(val, (int, float)):
                  if val > max_size: failed = True
              else:
                  if len(val) > max_size: failed = True
  
              if failed:
                  raise ValueError("param was bigger than {}".format(max_size))
  
          return val