{{ errors.first(‘username’) }}
{{ errors.first(’email’) }}
{{ errors.first(‘password’) }}
const app = new Vue({
el: ‘#app’,
data: {
username: ”,
email: ”,
password: ”
},
methods: {
validateForm() {
this.$validator.validateAll().then(result => {
if (result) {
alert(‘Form submitted successfully’);
}
});
}
}
});
Vue.use(VeeValidate);
This video uses the "Vee-validate" form library and "Yup" schema builder.
Links:
Vee-validate: https://vee-validate.logaretm.com/v4/
Yup: https://github.com/jquense/yup
Have a nice coding.👌