[Vuejs]-How can I force user to choose at least one option to go to next page Vue JS

0👍

Add the following to your next() method:

if (!this.userResponses[this.index]) { return }

Note: there are many assumptions this answer is based on. I assume that userResponses and index are defined as your component data and you have written your next method.

Another note: Am I seeing correctly that you are setting value of an input to true for correct answer? This is, well, a terrible idea – this basically mean I can inspect html to get 100% from your quiz.

Leave a comment