Skip to content

fix: allow access to root-level issues in schema-less forms#14893

Merged
dummdidumm merged 5 commits into
sveltejs:mainfrom
sillvva:issue-14892
Nov 20, 2025
Merged

fix: allow access to root-level issues in schema-less forms#14893
dummdidumm merged 5 commits into
sveltejs:mainfrom
sillvva:issue-14892

Conversation

@sillvva

@sillvva sillvva commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

fixes #14892

When you have a form with no schema, the invalid method is available, but form.fields is of type never, preventing access to the root-level issues.

export const test = form((invalid) => {
	throw invalid('testing');
});

test.fields.issues(); // type error
//   ^? never

Lint test added to remote.test.ts for the f8 form.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@changeset-bot

changeset-bot Bot commented Nov 5, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 552544f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

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

Comment thread packages/kit/src/exports/public.d.ts Outdated
Co-authored-by: Simon H <[email protected]>
@svelte-docs-bot

Copy link
Copy Markdown

@dummdidumm dummdidumm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@dummdidumm dummdidumm merged commit 2ff3951 into sveltejs:main Nov 20, 2025
22 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 20, 2025
Copilot AI pushed a commit to Stadly/kit that referenced this pull request Mar 6, 2026
…#14893)

* fix: allow access to root-level issues in schema-less forms

* feat: use IsAny type to account for `f7` test

* include `allIssues()`

* simplify type

Co-authored-by: Simon H <[email protected]>

* Update types

---------

Co-authored-by: Simon H <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot access root-level .issues() in schema-less form

3 participants