If you want whitespace from user input to be trimmed automatically, you can add the trim modifier to your v-model-managed inputs.
<input v-model.trim="msg" />
A highly curated collection of practical tips, advanced patterns, and performance tweaks for Vue & Nuxt.