From 4f653ddceac466302b587830089c4cd5ffd7eff6 Mon Sep 17 00:00:00 2001 From: Yuki Ishii Date: Thu, 2 Oct 2025 00:56:32 +0900 Subject: [PATCH] fix: update error message to clarify usage with radio inputs (#16874) * fix: update error message to clarify usage with radio inputs * show an extra bind checked error when a radio type * typo * replace 'group' binding with , drive-by fix some other messages --------- Co-authored-by: Rich Harris --- .changeset/slow-nails-push.md | 5 +++++ documentation/docs/03-template-syntax/12-bind.md | 4 +++- .../phases/2-analyze/visitors/BindDirective.js | 12 ++++++++---- .../dynamic-element-binding-invalid/_config.js | 2 +- .../samples/binding-dimensions-svg/errors.json | 2 +- .../samples/binding-input-checked/errors.json | 2 +- .../binding-invalid-on-element-2/errors.json | 2 +- .../samples/binding-invalid-on-element/errors.json | 2 +- .../binding-radio-input-checked/errors.json | 14 ++++++++++++++ .../binding-radio-input-checked/input.svelte | 5 +++++ 10 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 .changeset/slow-nails-push.md create mode 100644 packages/svelte/tests/validator/samples/binding-radio-input-checked/errors.json create mode 100644 packages/svelte/tests/validator/samples/binding-radio-input-checked/input.svelte diff --git a/.changeset/slow-nails-push.md b/.changeset/slow-nails-push.md new file mode 100644 index 0000000000..8dedf35593 --- /dev/null +++ b/.changeset/slow-nails-push.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: update `bind:checked` error message to clarify usage with radio inputs diff --git a/documentation/docs/03-template-syntax/12-bind.md b/documentation/docs/03-template-syntax/12-bind.md index de57815687..c21ed35919 100644 --- a/documentation/docs/03-template-syntax/12-bind.md +++ b/documentation/docs/03-template-syntax/12-bind.md @@ -95,7 +95,7 @@ Since 5.6.0, if an `` has a `defaultValue` and is part of a form, it will ## `` -Checkbox and radio inputs can be bound with `bind:checked`: +Checkbox inputs can be bound with `bind:checked`: ```svelte