Search code examples
vue.jsvuejs2vee-validate

Vee-Validate not working with form wizard


I'm validating multi step form with vee validate, I want to do step wise validation for step 1 need to validate only first step field i have implemented it in this codesandbox:

https://codesandbox.io/s/ecstatic-https-oc4u2?file=/src/App.vue

But the issue is i cannot move to next step because validation function is also validating second step field in first step.


Solution

  • validate has an option to validate only specific fields. If it is empty validate() it will validate all fields. So you can try this.$validator.validate("title", this.formData.name)