-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: remove old references about invalid.fieldName(...) for issues
#15118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Updated the explanation of the `invalid` function to include its origin from `@sveltejs/kit` and clarified its usage.
invalid.fieldName(...) for issues
| - 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: |
There was a problem hiding this comment.
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
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