Skip to content

Commit e2d70af

Browse files
authored
fix(form): reset submitting flag when validation fails to keep dirtycheck
When the preventLeaving feature is used, the dirtycheck was ignored on a submit even when the validation failed (which aborts the submit). Whenever a validation failes it should therefore also reset a possible existing submitting flag to keep the preventLeavin feature working
1 parent 182dd81 commit e2d70af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/definitions/behaviors/form.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,7 @@ $.fn.form = function(parameters) {
11921192
}
11931193
else {
11941194
module.debug('Form has errors');
1195+
submitting = false;
11951196
module.set.error();
11961197
if(!settings.inline) {
11971198
module.add.errors(formErrors);

0 commit comments

Comments
 (0)