From 5c5aa81ba093ee8bc842352e20245be8db357ac7 Mon Sep 17 00:00:00 2001 From: Fabian Hiller Date: Tue, 2 Jul 2024 13:23:57 +0200 Subject: [PATCH] Update API reference of forward method on website --- website/src/routes/api/(methods)/forward/index.mdx | 6 +++--- website/src/routes/api/(methods)/forward/properties.ts | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/website/src/routes/api/(methods)/forward/index.mdx b/website/src/routes/api/(methods)/forward/index.mdx index e33fcf1ae..70aa6d8cb 100644 --- a/website/src/routes/api/(methods)/forward/index.mdx +++ b/website/src/routes/api/(methods)/forward/index.mdx @@ -14,7 +14,7 @@ import { properties } from './properties'; Forwards the issues of the passed validation action. ```ts -const Action = v.forward(action, pathList); +const Action = v.forward(action, pathKeys); ``` ## Generics @@ -25,11 +25,11 @@ const Action = v.forward(action, pathList); ## Parameters - `action` -- `pathList` +- `pathKeys` ### Explanation -`forward` allows you to forward the issues of the passed validation `action` via a `pathList` to a nested field of a schema. +`forward` allows you to forward the issues of the passed validation `action` via `pathKeys` to a nested field of a schema. ## Returns diff --git a/website/src/routes/api/(methods)/forward/properties.ts b/website/src/routes/api/(methods)/forward/properties.ts index a985e3d46..241470269 100644 --- a/website/src/routes/api/(methods)/forward/properties.ts +++ b/website/src/routes/api/(methods)/forward/properties.ts @@ -12,8 +12,9 @@ export const properties: Record = { generics: ['string', 'unknown'], }, { - type: 'array', - item: 'unknown', + type: 'custom', + name: 'ArrayLike', + generics: ['unknown'], }, ], }, @@ -48,10 +49,11 @@ export const properties: Record = { ], }, }, - pathList: { + pathKeys: { type: { type: 'custom', - name: 'PathList', + name: 'PathKeys', + href: '../PathKeys/', generics: [ { type: 'custom',