From 0e97c8263a54dced2b0c34c4241769b66b0051c6 Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Wed, 8 Aug 2018 00:29:38 -0500 Subject: [PATCH] Document v-model.number behavior for invalid strings --- src/v2/api/index.md | 2 +- src/v2/guide/forms.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 614e6061b7..c267bfafcc 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -2140,7 +2140,7 @@ type: api - **Modifiers:** - [`.lazy`](../guide/forms.html#lazy) - listen to `change` events instead of `input` - - [`.number`](../guide/forms.html#number) - cast input string to numbers + - [`.number`](../guide/forms.html#number) - cast valid input string to numbers - [`.trim`](../guide/forms.html#trim) - trim input - **Usage:** diff --git a/src/v2/guide/forms.md b/src/v2/guide/forms.md index b90dbe6b0c..d8f35c02e3 100644 --- a/src/v2/guide/forms.md +++ b/src/v2/guide/forms.md @@ -368,7 +368,7 @@ If you want user input to be automatically typecast as a number, you can add the ``` -This is often useful, because even with `type="number"`, the value of HTML input elements always returns a string. +This is often useful, because even with `type="number"`, the value of HTML input elements always returns a string. If the value cannot be parsed with `parseFloat()`, then the original value is returned. ### `.trim`