Skip to content

Commit 88e7a39

Browse files
authored
v-model.number: clarify unexpected behavior (not a warning!)
1 parent bd8df96 commit 88e7a39

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/guide/essentials/forms.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,7 @@ If you want user input to be automatically typecast as a number, you can add the
442442
<input v-model.number="age" />
443443
```
444444

445-
:::warning
446445
If the value cannot be parsed with `parseFloat()`, then the original (string) value is used instead. In particular, if the input is empty (for instance after the user clearing the input field), an empty string is returned. This behavior differs from the [DOM property `valueAsNumber`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#valueasnumber).
447-
:::
448446

449447
The `number` modifier is applied automatically if the input has `type="number"`.
450448

0 commit comments

Comments
 (0)