javascript - jQuery Validation invalidHandler not called -
i'm using jquery validation plugin. when submission invalid, invalidhandler callback not getting called.
$j('#my_form').validate({ errorclass: 'fielderror', onkeyup: false, rules: { ... }, messages: { ... }, invalidhandler: function () { console.log('invalidhandler'); }, });
reorder options object invalidhandler first.
this shouldn't change behavior because according ecmascript standard, object properties have no order. browsers maintain order of object properties anyway, plugin must using object in non-standard way. solution found here.
$j('#my_form').validate({ invalidhandler: function () { console.log('invalidhandler'); }, errorclass: 'fielderror', onkeyup: false, rules: { ... }, messages: { ... }, });
Comments
Post a Comment