As mentioned at the beginning of this chapter, we must always validate user input to make sure the data we received is valid. In this section, we will implement validation on the frontend using Vuelidate (https://monterail.github.io/vuelidate), which is a model-based validation library for Vue.js.
First of all, let's install Vuelidate with the following command:
npm install vuelidate --save
Once it is done, let's write the unit test code for data validation.