mirror of https://github.com/sveltejs/svelte
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 <rich.harris@vercel.com>pull/16877/head
parent
31541c8849
commit
4f653ddcea
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: update `bind:checked` error message to clarify usage with radio inputs
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "bind_invalid_target",
|
||||||
|
"message": "`bind:checked` can only be used with `<input type=\"checkbox\">` — for `<input type=\"radio\">`, use `bind:group`",
|
||||||
|
"start": {
|
||||||
|
"line": 5,
|
||||||
|
"column": 20
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 5,
|
||||||
|
"column": 38
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
let foo;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<input type="radio" bind:checked={foo}>
|
Loading…
Reference in new issue