---
title: Validated Choice Lists
---

<Callout>
Added in Fzzy Config 0.6.0
</Callout>

Create sets of toggle-able choices with `ValidatedChoiceList`. This is a feature-flag-style setting, poll for active features using `List#contains`.

This validation is a `List<T>`, where T is your choice type. Like `ValidatedList`, this implements `List`, so can be used directly for list operations.

Easily create a choice list using `toChoiceList` in `ValidatedList / Set / Choice`.

<CodeTabs>

```java !!tabs Java
ValidatedChoiceList<String> enabledFeatures = ValidatedList.ofString(
		"dev_mode", "logging", "fail_fast", "compatibility_mode" //the total list of choices/features
).toChoiceList(
		listOf("logging") //the enabled-by-default features
);
```

```kotlin !!tabs Kotlin
val enabledFeatures = ValidatedList.ofString(
    "dev_mode", "logging", "fail_fast", "compatibility_mode" //the total list of choices/features
).toChoiceList(
    listOf("logging") //the enabled-by-default features
)
```

</CodeTabs>

The in-GUI popup with the available choices, each in an enabled or disabled state. Clicking on a choice flips its state.

![Validated Choice List Popup](https://github.com/user-attachments/assets/f1d54c0e-9bc6-46dc-89eb-003383f3426c)

<Callout>
See the documentation page <a target="_blank" rel="noopener" href="https://fzzyhmstrs.github.io/fconfig/-fzzy%20-config/me.fzzyhmstrs.fzzy_config.validation.collection/-validated-choice-list/index.html">here 🗗</a>
</Callout>