Skip to content

Commit a817176

Browse files
Sync kit docs (#1551)
sync kit docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 3fee27b commit a817176

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
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;

0 commit comments

Comments
 (0)