---
title: Validated Enums
---

Any enum included in a Config is automatically validated; `ValidatedEnum` is still useful for constructing other validation types.

<CodeTabs>

```java !!tabs Java
public enum MyEnum {
    A,
    B,
    C
}

public MyEnum simpleEnum = MyEnum.A; //this will work most of the time
public ValidatedEnum<MyEnum> validatedEnum = new ValidatedEnum(MyEnum.A, ValidatedEnum.WidgetType.CYCLING); //ValidatedEnum can be used to customize the GUI appearance
```

```kotlin !!tabs Kotlin
enum class MyEnum {
    A,
    B,
    C
}

var simpleEnum = MyEnum.A //this will work most of the time
var validatedEnum = ValidatedEnum(MyEnum.A, ValidatedEnum.WidgetType.CYCLING) //ValidatedEnum can be used to customize the GUI appearance
var validatedEnumExtension = MyEnum.A.validated() // kotlin extension function for validating an enum automatically
```

</CodeTabs>

### Translation
Enums can implement `EnumTranslatable` which provides custom names and tooltips for each enum constant. See [Translation](../Translation#-enumtranslatable) for details.

<Callout>
See the documentation pages for <a target="_blank" rel="noopener" href="https://fzzyhmstrs.github.io/fconfig/-fzzy%20-config/me.fzzyhmstrs.fzzy_config.util/-translatable/index.html">Translatable 🗗</a>, <a target="_blank" rel="noopener" href="https://fzzyhmstrs.github.io/fconfig/-fzzy%20-config/me.fzzyhmstrs.fzzy_config.util/-enum-translatable/index.html">EnumTranslatable 🗗</a>
</Callout>