Browse Source

#703 #4093 callbacks should not occur when using is valid

pull/5058/merge
Jack Lukic 7 years ago
parent
commit
d163b57745
1 changed files with 2 additions and 2 deletions
  1. 4
      src/definitions/behaviors/form.js

4
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;

Loading…
Cancel
Save