---
title: Validated Registry Objects
---

`ValidatedRegistryType` provides a simple way to create validation for registered object types, as long as the registry is defaulted. This lets your config provide relevant objects instead of having to map them from identifiers yourself.

<Callout variant="info">
There is also a method overload with a default parameter that bypasses the `DefaultedRegistry` restriction.
</Callout>

<CodeTabs>

```java !!tabs Java
// the resulting field will directly provide items, not identifiers for items
public ValidatedField<Item> mapped = ValidatedRegistryType.of(Registries.ITEM);
```

```kotlin !!tabs Kotlin
// the resulting field will directly provide items, not identifiers for items
var mapped: ValidatedField<Item> = ValidatedRegistryType.of(Registries.ITEM)
```

</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.minecraft/-validated-registry-type/index.html">here 🗗</a>
</Callout>