docs: def set_minmax(field, render_kw=None, force=False):
      """
      Returns *render_kw* with *min* and *max* set if validators use them.
  
      Sets *min* and / or *max* keys if a `Length` or `NumberRange` validator is
      using them.
  
      ..note::
  
          This won't change keys already present unless *force* is used.
  
      """
      if render_kw is None:
          render_kw = {}
      for validator in field.validators:
          if isinstance(validator, MINMAX_VALIDATORS):
              if 'min' not in render_kw or force:
                  v_min = getattr(validator, 'min', -1)
                  if v_min not in (-1, None):
                      render_kw['min'] = v_min
              if 'max' not in render_kw or force:
                  v_max = getattr(validator, 'max', -1)
                  if v_max not in (-1, None):
                      render_kw['max'] = v_max
      return render_kw