> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# setValidation

> Enable or disable verb schema validation at runtime.

[ref-addverb]: /docs/server-sdks/reference/typescript/agents/swml-builder/add-verb

Toggle verb schema validation at runtime. When validation is enabled (the
default), [`addVerb()`][ref-addverb] validates each verb's config against the
schema and throws if it fails. Disable validation for performance-sensitive
call paths or when constructing verbs with custom schemas not known to the
built-in schema utilities.

<Note>
  Matches the Python `schema_validation` constructor parameter on
  `AgentBase`. For SWML service validation at construct time, pass
  `schemaValidation: false` to the `SwmlBuilder` constructor via
  `SwmlBuilderOptions`.
</Note>

## **Parameters**

<ParamField path="enabled" type="boolean" required={true} toc={true}>
  `true` to enable schema validation on subsequent `addVerb()` calls, `false`
  to disable.
</ParamField>

## **Returns**

`void`

## **Example**

```typescript {8}
import { SwmlBuilder } from '@signalwire/sdk';

const builder = new SwmlBuilder();

// Validation on (default) — throws on invalid verb
builder.answer();

// Disable validation for a hot path
builder.setValidation(false);
builder.addVerb('custom_verb', { unusual: 'payload' });
```