Skip to content

Commit

Permalink
grunt build
Browse files Browse the repository at this point in the history
  • Loading branch information
tb committed Mar 8, 2015
1 parent 3b8ee62 commit bd8e73f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions dist/angular-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@
return deferred.promise;
};

/**
* Do this function if validation valid
* @param element
*/
this.validCallback = null;

/**
* Do this function if validation invalid
* @param element
*/
this.invalidCallback = null;

/**
* reset the specific form
Expand Down Expand Up @@ -269,6 +280,8 @@
showErrorMessage: this.showErrorMessage,
checkValid: this.checkValid,
validate: this.validate,
validCallback: this.validCallback,
invalidCallback: this.invalidCallback,
reset: this.reset
};
}
Expand Down Expand Up @@ -312,6 +325,7 @@
}
ctrl.$setValidity(ctrl.$name, true);
if (scope.validCallback) scope.validCallback();
if ($validationProvider.validCallback) $validationProvider.validCallback(element);

return true;
};
Expand Down Expand Up @@ -343,6 +357,7 @@
}
ctrl.$setValidity(ctrl.$name, false);
if (scope.inValidCallback) scope.inValidCallback();
if ($validationProvider.invalidCallback) $validationProvider.invalidCallback(element);

return false;
};
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-validation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bd8e73f

Please sign in to comment.