Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Core: Don't call submitHandler when in debug mode#2193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/core.js Outdated
@@ -64,7 +65,8 @@ $.extend( $.fn, { | |||
.appendTo( validator.currentForm ); | |||
} | |||
if ( validator.settings.submitHandler ) { | |||
// Only call the submit handler in case the validator is not on debug mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The comment does not provide value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Would it make sense to write a console.log in debug mode instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah, you're right! It doesn't have any additional value. I don't know why I wrote that comment in the first place (it was around 2AM when I created this PR). Will remove it in a moment.
As for the console.log, it will not make sense to print that the submitHandler will not be called when it supposed to not be called in the first place. So, we will just let it that way.
d38c997
tob115011
CompareThanks for the review@staabm :) |
Fixes#2042