Skip to content

Commit f840e04

Browse files
Sync kit docs (#1642)
sync kit docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 4f76ef2 commit f840e04

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default config;
3434

3535
## Overview
3636

37-
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint. Remote files must be placed in your `src` directory.
37+
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint. Remote files can be placed anywhere in your `src` directory (except inside the `src/lib/server` directory), and third party libraries can provide them, too.
3838

3939
## query
4040

@@ -326,6 +326,8 @@ A form is composed of a set of _fields_, which are defined by the schema. In the
326326
327327
These attributes allow SvelteKit to set the correct input type, set a `name` that is used to construct the `data` passed to the handler, populate the `value` of the form (for example following a failed submission, to save the user having to re-enter everything), and set the [`aria-invalid`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid) state.
328328
329+
> [!NOTE] The generated `name` attribute uses JS object notation (e.g. `nested.array[0].value`). String keys that require quotes such as `object['nested-array'][0].value` are not supported. Under the hood, boolean checkbox and number field names are prefixed with `b:` and `n:`, respectively, to signal SvelteKit to coerce the values from strings prior to validation.
330+
329331
Fields can be nested in objects and arrays, and their values can be strings, numbers, booleans or `File` objects. For example, if your schema looked like this...
330332
331333
```js

apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,6 +2405,23 @@ type RemoteForm<
24052405

24062406
</div>
24072407

2408+
## RemoteFormAllIssue
2409+
2410+
<div class="ts-block">
2411+
2412+
```dts
2413+
interface RemoteFormAllIssue extends RemoteFormIssue {/*…*/}
2414+
```
2415+
2416+
<div class="ts-block-property">
2417+
2418+
```dts
2419+
path: Array<string | number>;
2420+
```
2421+
2422+
<div class="ts-block-property-details"></div>
2423+
</div></div>
2424+
24082425
## RemoteFormField
24092426

24102427
Form field accessor type that provides name(), value(), and issues() methods

0 commit comments

Comments
 (0)