> ## 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.

# validateFormValues()

> Function exported by @botmesh/core/spi.

```ts theme={null}
function validateFormValues(
   def, 
   raw, 
   t?
): FormValidation;
```

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

Validate and normalize a whole submission (e.g. a native form reply): unknown
keys are dropped, missing optional fields are omitted, values are coerced to
the [FormValues](https://botmesh.afaya.com.co/api/core/type-aliases/FormValues.md) types. `t` localizes the error messages (default: built-in
Spanish `core.form.*`; the form runtime passes `c.t`).

## Parameters

| Parameter | Type | Default value |
| - | - | - |
| `def` | [`FormDefinition`](https://botmesh.afaya.com.co/api/core/interfaces/FormDefinition) | `undefined` |
| `raw` | `Record`\<`string`, `unknown`> | `undefined` |
| `t?` | [`Translate`](https://botmesh.afaya.com.co/api/core/type-aliases/Translate) | `defaultT` |

## Returns

[`FormValidation`](https://botmesh.afaya.com.co/api/core/spi/type-aliases/FormValidation)


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