Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / guardrails / maxLength
Function: maxLength()
ts
function maxLength<TValue>(opts): GuardrailDefinition<TValue>;Defined in: packages/security/src/guardrails/builtins/max-length.ts:47
Construct a maxLength guardrail. Returns an input or output variant depending on the stage option.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValue | unknown |
Parameters
| Parameter | Type |
|---|---|
opts | MaxLengthOptions |
Returns
GuardrailDefinition<TValue>