Skip to content

Commit b7d93b5

Browse files
kazuponchrisvfritz
authored andcommitted
add trim modifier (volksbright#374)
* add trim modifier * fix grammer and typo * re-fix grammer * fix typo
1 parent 70c4f97 commit b7d93b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/guide/forms.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,11 @@ If you want user input to be automatically typecast as a number, you can add the
344344
```
345345

346346
This is often useful, because even with `type="number"`, the value of HTML input elements always returns a string.
347+
348+
### `.trim`
349+
350+
If you want user input to be trimmed automatically, you can add the `trim` modifier to your `v-model` managed inputs:
351+
352+
```html
353+
<input v-model.trim="msg">
354+
```

0 commit comments

Comments
 (0)