---
title: Validated TriStates
---

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

Validation for a Fzzy Config-specific `TriState` (also found in Fabric API, Minecraft itself, etc.). It has three values, `TRUE`, `FALSE`, and `DEFAULT`.

Tri-states in Fzzy Config implement `TriStateProvider` which includes helper methods for getting and interacting with a tri-state. `ValidatedTriState` also implements this and so can be interacted with directly.

`ValidatedField` and `ValidatedCondition` accept a BooleanSupplier for conditions, which `TriStateProvider` conveniently is. `DEFAULT` will act like `FALSE` in this case. See [Conditional Settings](../Validation#-conditional-settings-) to learn more.

<CodeTabs>

```java !!tabs Java
public ValidatedTriState myTriState = new ValidatedTriState(TriState.TRUE);

public ValidatedTriState myTriState2 = new ValidatedTriState(TriState.TRUE, ValidatedTriState.WidgetType.CYCLING); //default widget has the three states side-by-side. A more classic MC cycling widget can also be used.

public TriState mySimpleTriState = TriState.TRUE; //simple fields also work, validation will be wrapped automatically like most types.
```

```kotlin !!tabs Kotlin
var myTriState = ValidatedTriState(TriState.TRUE)

var myTriState2 = ValidatedTriState(TriState.TRUE, ValidatedTriState.WidgetType.CYCLING) //default widget has the three states side-by-side. A more classic MC cycling widget can also be used.

var mySimpleTriState = TriState.TRUE //simple fields also work, validation will be wrapped automatically like most types.
```

</CodeTabs>

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