Useful Tools In Vue.js Web Development
When I eventually looked at the docs, I found out it was not difficult to get started with and I could validate my form fields in no time and move on to the next thing.
You can install Vuelidate using any of the following package managers.
yarn add vuelidate
npm install vuelidate –save
After installation, the next thing would be to add it to your app’s config in the main.js file so you can use it in your vue files.
import Vuelidate from ‘vuelidate’
Vue.use(Vuelidate)
Assuming you have a form that looks like this in your app;
Now to validate this type of form, you first need to decide on what type of validation you need for each form field. For instance, you can decide you need the minimum length of the fullName to be 10 and the minimum age to be 18.