VueJs Remove Spaces From Input Value


VueJs Remove Spaces From Input Value

Delete all spaces from input value:

<input type="text" name="card_number" v-model="foo">
<input type="hidden" name="bar" :value="foo.replace(/\s/g, '')">

Yorumlar