The bad practice to avoid in your VueJS forms
NicolasBrondinBernard
Author
@NicolasBrondinBernardIf you're making this mistake, it's not too late to start using `<form>` elements again!

Article published on 03/04/2023, last updated on 10/08/2026
I'd stake my life on it: 95% of the forms you build with VueJS look like this:
<div class="form">
<label for="email">Email *</label>
<input type="email" id="email" v-model="email" />
<label for="password">Password *</label>
<input type="password" id="password" v-model="password" />
<p v-if="error">{{ error }}</p>
<button @click="send()">Envoyer</button>
</div>
Of course, maybe you use a library to generate and style your <input>, so your form is slightly different, but a real design flaw is hiding behind this form...
This flaw is that it's not actually a form!
Why use a
Finished reading this article?
Take it to the next level with our courses!
Complete courses, exercises and certificates to really learn programming!
4.8 average rating
Comments (0)
to leave a comment
No comments yet