Skip to content

Commit bd8e73f

Browse files
committed
grunt build
1 parent 3b8ee62 commit bd8e73f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

dist/angular-validation.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@
222222
return deferred.promise;
223223
};
224224

225+
/**
226+
* Do this function if validation valid
227+
* @param element
228+
*/
229+
this.validCallback = null;
230+
231+
/**
232+
* Do this function if validation invalid
233+
* @param element
234+
*/
235+
this.invalidCallback = null;
225236

226237
/**
227238
* reset the specific form
@@ -269,6 +280,8 @@
269280
showErrorMessage: this.showErrorMessage,
270281
checkValid: this.checkValid,
271282
validate: this.validate,
283+
validCallback: this.validCallback,
284+
invalidCallback: this.invalidCallback,
272285
reset: this.reset
273286
};
274287
}
@@ -312,6 +325,7 @@
312325
}
313326
ctrl.$setValidity(ctrl.$name, true);
314327
if (scope.validCallback) scope.validCallback();
328+
if ($validationProvider.validCallback) $validationProvider.validCallback(element);
315329

316330
return true;
317331
};
@@ -343,6 +357,7 @@
343357
}
344358
ctrl.$setValidity(ctrl.$name, false);
345359
if (scope.inValidCallback) scope.inValidCallback();
360+
if ($validationProvider.invalidCallback) $validationProvider.invalidCallback(element);
346361

347362
return false;
348363
};

dist/angular-validation.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)