> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Function: validate()

> **validate**(`value`: `unknown`, `rules`: [`ParsedRule`](/next/api/genui/openui/core/interfaces/ParsedRule.md)\[], `customValidators?`: `Record`\<`string`, [`ValidatorFn`](/next/api/genui/openui/core/type-aliases/ValidatorFn.md)>): `string` | `undefined`

Run all rules against a value. Stop on first error.
Custom validators are checked first, then built-in ones.

## Parameters

| Parameter           | Type                                                                                          |
| ------------------- | --------------------------------------------------------------------------------------------- |
| `value`             | `unknown`                                                                                     |
| `rules`             | [`ParsedRule`](/next/api/genui/openui/core/interfaces/ParsedRule.md)\[]                       |
| `customValidators?` | `Record`\<`string`, [`ValidatorFn`](/next/api/genui/openui/core/type-aliases/ValidatorFn.md)> |

## Returns

`string` | `undefined`
