<a id="skfolio-utils-tools-validate-input-list"></a>

# skfolio.utils.tools.validate_input_list

<a id="skfolio.utils.tools.validate_input_list"></a>

### skfolio.utils.tools.validate_input_list(items, n_assets, assets_names, name, raise_if_string_missing=True)

Convert a list of items (asset indices or asset names) into a list of
validated asset indices.

* **Parameters:**
  **items** *list[int | str]*
  : List of asset indices or asset names.

  **n_assets** *int*
  : Expected number of assets.
    Used for verification.

  **assets_names** *ndarray, optional*
  : Asset names used when `items` contain strings.

  **name** *str*
  : Name of the items used for error messages.

  **raise_if_string_missing** *bool, default=True*
  : If set to True, raises an error if an item string is missing from assets_names;
    otherwise, issue a User Warning.
* **Returns:**
  **values** *list[int]*
  : Converted and validated list.

