Skip to content

Commit 5b50e05

Browse files
committed
cleanup and improvements in async validations
1 parent 15927d1 commit 5b50e05

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

src/main/async.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
this.$form = $form;
3535
this.$input = $input;
3636
this.reset();
37+
$input.on('change paste', this.reset.bind(this));
3738
}
3839

3940
AsyncValidation.prototype.reset = function() {
@@ -53,7 +54,7 @@
5354
}
5455
return null; // Waiting for result
5556
} else if(this.hasRun) {
56-
this.$input.one('keyup paste', this.reset.bind(this));
57+
//this.$input.one('keyup change paste', this.reset.bind(this));
5758
return this.result;
5859
} else {
5960
if (eventContext === 'submit') {

src/main/jquery-plugins.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,6 @@
319319
displayError = false;
320320
}
321321

322-
$.formUtils.isValidatingEntireForm = true;
323-
$.formUtils.haltValidation = false;
324-
325322
/**
326323
* Adds message to error message stack if not already in the message stack
327324
*

src/main/setup.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585

8686
// Trigger jQuery event that we're about to setup validation
8787
var $form = $(form);
88-
// $.formUtils.$win.trigger('formValidationSetup', [$form, conf]);
8988
$form.trigger('formValidationSetup', [$form, conf]);
9089

9190
// Remove classes and event handlers that might have been

src/main/utils.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@
5757
*/
5858
haltValidation: false,
5959

60-
/**
61-
* This variable will be true $.fn.isValid() is called
62-
* and false when $.fn.validateOnBlur is called
63-
*/
64-
isValidatingEntireForm: false,
65-
6660
/**
6761
* Function for adding a validator
6862
* @param {Object} validator

0 commit comments

Comments
 (0)