Closed xxvii closed 2 years ago
It's not strictly Parsley fault, because the type attribute should be mandatory for the button tag, but I have the feeling that it should work in any case.
I'm sorry you wasted time and I agree with you that the fact that the default type
for a <button>
is submit
is a very dubious choice of the HTML standard. If you'd like a note to that effect incorporated somewhere in the docs / example page, please open a PR.
Good luck
What kind of issue is this? (put 'x' between the square brackets)
[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn't working the way you expect it to, use http://stackoverflow.com/questions/ask . Provide working code, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101. We monitor the tag
parsley.js
.[ x] Bug report. If you’ve found a bug, you must provide a minimal example in a CodePen, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101 .
[ ] Feature Request. Make sure there's no good way to do what you want first; consider asking on http://stackoverflow.com/questions/ask first.
I just spent a ridiculous amount of time trying to figure out why Parsley would validate all inputs in all steps of the form when I click the "Next" button in the first step, instead of validating only the inputs inside the first step.
Here is a reduced test case, the code is exactly the same as here https://parsleyjs.org/doc/examples/multisteps.html, I only removed type="button" from the Next button. https://codepen.io/Stanza27/pen/rNGLRqJ
If you add type="button" again, or if you use another tag instead of button (a, span, whatever...) everything works.
It's not strictly Parsley fault, because the type attribute should be mandatory for the button tag, but I have the feeling that it should work in any case.
At least add a big red warning in the documentation and in the examples. Thank you, sorry for the rant.