Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

The documentation incorrectly described invalid() as a proxy object with property access syntax (invalid.fieldName(message)), which doesn't exist in the actual API after PR #14768.

EDIT: not using copilot agent was better

@changeset-bot
Copy link

changeset-bot bot commented Jan 1, 2026

⚠️ No Changeset found

Latest commit: b976f1b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 2 commits January 1, 2026 19:05
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove invalid.fieldName(message) usage in documentation docs: correct invalid() usage from invalid.fieldName() to issue parameter Jan 1, 2026
Copilot AI requested a review from teemingc January 1, 2026 19:09
@svelte-docs-bot
Copy link

Updated the explanation of the `invalid` function to include its origin from `@sveltejs/kit` and clarified its usage.
@teemingc teemingc marked this pull request as ready for review January 2, 2026 07:10
@teemingc teemingc added the documentation Improvements or additions to documentation label Jan 2, 2026
@teemingc teemingc linked an issue Jan 2, 2026 that may be closed by this pull request
@teemingc teemingc changed the title docs: correct invalid() usage from invalid.fieldName() to issue parameter docs: remove old references about invalid.fieldName(...) for issues Jan 2, 2026
Comment on lines +459 to +460
- It throws just like `redirect` or `error`
- It accepts multiple arguments that can be strings (for issues relating to the form as a whole and will show up in `fields.allIssues()`) or standard-schema-compliant issues (for those relating to a specific field). Use the `issue` parameter for type-safe creation of such issues:
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if this is better to move below the example code block just like how it was

@teemingc teemingc added the forms Stuff relating to forms and form actions label Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation forms Stuff relating to forms and form actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: remove invalid.fieldName(message) usage

2 participants