Skip to content

Commit c1da41a

Browse files
committed
Merge pull request victorjonsson#210 from JoshKoberstein/master
Adding onInlineError callback
2 parents ef65dc3 + a148aa6 commit c1da41a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

form-validator/jquery.form-validator.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@
259259
_applyErrorStyle($elem, conf);
260260
_setInlineErrorMessage($elem, validation, conf, conf.errorMessagePosition);
261261

262+
// Run inline error callback
263+
if( typeof conf.onInlineError == 'function' ) {
264+
conf.onInlineError($elem, validation, conf);
265+
}
266+
262267
if(attachKeyupEvent) {
263268
$elem
264269
.unbind('keyup.validation')
@@ -557,7 +562,8 @@
557562
language : false,
558563
onSuccess : false,
559564
onError : false,
560-
onElementValidate : false
565+
onElementValidate : false,
566+
onInlineError : false
561567
});
562568

563569
conf = $.extend(defaultConf, conf || {});

0 commit comments

Comments
 (0)