Closed QJan84 closed 1 year ago
Closing this issue and folding it into #14 since that one targets the issue here.
@QJan84 sorry I closed this without really answering your question.
Anyways the step.html works because the next button is disabled until the fieldset it is in is completed. I'm using x-show to hide each step and not disabled. Disabled isn't the right attribute for fieldset steps since it is supposed to disable the validation of the fieldset as you mention in issue #14
Hello,
I have split a form into several
fieldset
and then stitch through the individualfieldset
. Before I get to the nextfieldset
, the validation should take place first and then, if everything is valid, the next step should be displayed.Inactive
fieldset
s are:disabled
, so that the form fields are not considered for validation. With the activefieldset
:disabled
is removed and thus the validation is active.In the docs there's an example of this in steps.html, which I don't quite understand.
<button type="button" @click="++step" :disabled="!$validate.isComplete($refs.contact)">Next</button>
How does the validation take place here? I have to validate first and then go to the next step, don't I? Does the
:disabled
make any sense here?Test HTML:
JS: