With stepper.setValidationMode(ValidationMode.ON_NEXT) we should be able va

With stepper.setValidationMode(ValidationMode.ON_NEXT) we should be able validate the content only when the NEXT button is pressed. But the VStepper object is already calling the isValid() method during initialization. So the ValidationMode.ON_NEXT parameter is not working properly.
In my opinion the code should be changed to:

protected void initialize() {
if (getParent().isPresent() && !steps.isEmpty() && currentStep == null) {
currentStep = steps.get(0);
currentStep.enter();
//next.setEnabled(currentStep.isValid());
next.setEnabled(validationMode == ValidationMode.ON_NEXT || currentStep.isValid());
content.add(currentStep.getContent());
}
}