[Vuejs]-How to prevent a form to navigate to next step. while input fields is empty. Using vue.js

0👍

You have a method checkForm but it seems you never call it.

Just change your next and prev methods to use that method as follows:

prev() {
  if(this.checkForm()) {
    this.step--;
  }
},
next() {
  if(this.checkForm()) {
    this.step++;
  }
},

Leave a comment