guillaumepotier / Parsley.js

Validate your forms, frontend, without writing a single line of javascript
http://parsleyjs.org
MIT License
9.05k stars 1.32k forks source link

When submit button clicked twice group other than specified is validated #1340

Closed aliemre1990 closed 3 years ago

aliemre1990 commented 3 years ago

What kind of issue is this? (put 'x' between the square brackets)

Here is the code example. When i click submit button twice it validates other group too.

https://jsfiddle.net/m68qkspb/13/

marcandre commented 3 years ago

Thanks for the bug report. I'm not sure exactly what is going on, but I suspect the issue is that parsley is assuming one will not interfere with the submitting control flow. I believe your code interfere's with Parsley's code, and Parsley might be rebinding itself after the first validation and taking over again (hence the validation of both fields).

Please use normal buttons to validate just part of the form. This example shows one way to do this.

HTH