diff --git a/src/HorizontalStepper.vue b/src/HorizontalStepper.vue index d3beaad..a914168 100644 --- a/src/HorizontalStepper.vue +++ b/src/HorizontalStepper.vue @@ -30,10 +30,10 @@ - + - +
@@ -104,7 +104,8 @@ export default { nextButton: {}, canContinue: false, finalStep: false, - keepAliveData: this.keepAlive + keepAliveData: this.keepAlive, + errorMessage: '', }; }, @@ -177,10 +178,13 @@ export default { this.canContinue = false; - this.$emit("before-next-step", { currentStep: this.currentStep }, (next = true) => { + this.$emit("before-next-step", { currentStep: this.currentStep }, (errorMessage, next = true) => { this.canContinue = true; if (next) { + this.errorMessage = ''; this.nextStepAction() + } else { + this.errorMessage = errorMessage; } }); },