From d163b57745b5b51db087b37c0310d80825b819f3 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Tue, 21 Feb 2017 00:22:13 -0500 Subject: [PATCH] #703 #4093 callbacks should not occur when using is valid --- src/definitions/behaviors/form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 836936cdf..ad5518c7e 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -896,15 +896,15 @@ $.fn.form = function(parameters) { if(fieldValid) { if(showErrors) { module.remove.prompt(identifier, fieldErrors); + settings.onValid.call($field); } - settings.onValid.call($field); } else { if(showErrors) { formErrors = formErrors.concat(fieldErrors); module.add.prompt(identifier, fieldErrors); + settings.onInvalid.call($field, fieldErrors); } - settings.onInvalid.call($field, fieldErrors); return false; } return true;