Skip to content

Commit 287d73f

Browse files
authored
Merge branch 'main' into packages-launch
2 parents 8895ce6 + 5c79e0a commit 287d73f

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

apps/svelte.dev/content/docs/kit/20-core-concepts/30-form-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ We can also implement progressive enhancement ourselves, without `use:enhance`,
441441
/** @param {SubmitEvent & { currentTarget: EventTarget & HTMLFormElement}} event */
442442
async function handleSubmit(event) {
443443
event.preventDefault();
444-
const data = new FormData(event.currentTarget);
444+
const data = new FormData(event.currentTarget, event.submitter);
445445

446446
const response = await fetch(event.currentTarget.action, {
447447
method: 'POST',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ For client-side validation, you can specify a _preflight_ schema which will popu
428428

429429
const schema = v.object({
430430
title: v.pipe(v.string(), v.nonEmpty()),
431-
content:v.pipe(v.string(), v.nonEmpty())
431+
content: v.pipe(v.string(), v.nonEmpty())
432432
});
433433
</script>
434434

apps/svelte.dev/content/docs/kit/98-reference/[email protected]

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,8 @@ type RemoteForm<
23522352
/** Validate the form contents programmatically */
23532353
validate(options?: {
23542354
includeUntouched?: boolean;
2355+
/** Perform validation as if the form was submitted by the given button. */
2356+
submitter?: HTMLButtonElement | HTMLInputElement;
23552357
}): Promise<void>;
23562358
/** The result of the form submission */
23572359
get result(): Output | undefined;

apps/svelte.dev/content/docs/svelte/03-template-syntax/19-await-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ let b = $derived(await two());
8484

8585
To render placeholder UI, you can wrap content in a `<svelte:boundary>` with a [`pending`](svelte-boundary#Properties-pending) snippet. This will be shown when the boundary is first created, but not for subsequent updates, which are globally coordinated.
8686

87-
After the contents of a boundary have resolved for the first time and replaced the `pending` snippet, you can detect subsequent async work with [`$effect.pending()`]($effect#$effect.pending). This is what you would use display a "we're asynchronously validating your input" spinner next to a form field, for example.
87+
After the contents of a boundary have resolved for the first time and have replaced the `pending` snippet, you can detect subsequent async work with [`$effect.pending()`]($effect#$effect.pending). This is what you would use to display a "we're asynchronously validating your input" spinner next to a form field, for example.
8888

8989
You can also use [`settled()`](svelte#settled) to get a promise that resolves when the current update is complete:
9090

0 commit comments

Comments
 (0)