> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# assertFormDefinition()

> Function exported by @botmesh/core/spi.

```ts theme={null}
function assertFormDefinition(def): void;
```

Defined in: [forms/validate.ts:59](https://github.com/andresayac/botmesh/blob/main/packages/core/src/forms/validate.ts#L59)

Throw a `TypeError` describing the first structural problem of `def` (bad id or
field name, duplicate names, empty options, inconsistent bounds, invalid
dates or patterns). Called by `flow().form()` at build time.

## Parameters

| Parameter | Type |
| - | - |
| `def` | [`FormDefinition`](https://botmesh.afaya.com.co/api/core/interfaces/FormDefinition) |

## Returns

`void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.