Repository navigation
feat: validate that all remote form fields were created with form.fields.foo.as(...) - #16331
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/19cbd86fa4c7c4a1c953aba151c28027c24a49ccOpen in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 19cbd86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
left a comment
There was a problem hiding this comment.
Additional Suggestions:
handle_focusoutfails to strip the/form_idsuffix from the field name, sotouched/can_validateare keyed with the raw suffixed name instead of the clean key, breakingfield.touched()and validation-skipping for non-array fields.
- Stale-submitter cleanup wrongly clears a field's reactive
inputvalue on every submit becauseform_datakeys retain the/suffix thatstrip_prefixdoesn't remove, so the presence check never matchesprevious_submitter_name.
commented
Jul 13, 2026
|
Writing this made me realize the whole form key parsing thing is duplicated in a lot of places (removing |
commented
Jul 13, 2026
|
Yeah, I've occasionally thought the same thing but never got round to acting on it |
closes #16321
Made the form ID a suffix so it's easier to read in the browser's inspector.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits