# Field::inhabitation-failed


**Key:** `Field::inhabitation-failed`

**Category:** inhabitation · **Severity:** error

**Source:** [`src/diag/hints.nix:898`](https://github.com/kleisli-io/nix-effects/blob/main/src/diag/hints.nix#L898)

the field's value does not inhabit the declared field type

## Example

`Hint::Field::inhabitation-failed` means the `Field` position contains a value that does not inhabit the generated type. The example shows the failing form first, then one way to give the checker the missing structure.

```nix
# Bad: the field value has the wrong shape.
User.validate { name = 42; }

# Better: use a value inhabiting the field type.
User.validate { name = "alice"; }

```


---

[← All diagnostic hints](/nix-effects/diag-hints)
