diff --git a/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md b/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md index 130223931..7a6a5e1c9 100644 --- a/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md +++ b/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md @@ -2357,7 +2357,10 @@ type RemoteForm< ): RemoteForm; /** Validate the form contents programmatically */ validate(options?: { + /** Set this to `true` to also show validation issues of fields that haven't been touched yet. */ includeUntouched?: boolean; + /** Set this to `true` to only run the `preflight` validation. */ + preflightOnly?: boolean; /** Perform validation as if the form was submitted by the given button. */ submitter?: HTMLButtonElement | HTMLInputElement; }): Promise; @@ -2459,6 +2462,37 @@ type RemoteFormFieldValue = +## RemoteFormFields + +Recursive type to build form fields structure with proxy access + +
+ +```dts +type RemoteFormFields = + WillRecurseIndefinitely extends true + ? RecursiveFormFields + : NonNullable extends + | string + | number + | boolean + | File + ? RemoteFormField> + : T extends string[] | File[] + ? RemoteFormField & { + [K in number]: RemoteFormField; + } + : T extends Array + ? RemoteFormFieldContainer & { + [K in number]: RemoteFormFields; + } + : RemoteFormFieldContainer & { + [K in keyof T]-?: RemoteFormFields; + }; +``` + +
+ ## RemoteFormInput