I use a combination of overriding the most highlighted / unlit.
//Update the validator highlight/unhighlight $.validator.setDefaults({ ignoreTitle:true ,highlight: function (element) { var el = $(element); //TODO: Handle UI changes, add/remove classes el.trigger("validate.fail"); } ,unhighlight: function (element) { var el = $(element) //TODO: Handle UI changes, add/remove classes el.trigger("validate.success") } });
Now I can just bind the validate.fail method ...
$("#myInputElement").bind("validate.fail",function(){
NOTE. I have already done this in the past to integrate jQuery with bootstrap user interfaces ... it worked very well.
Tracker1 Aug 07 2018-12-12T00: 00Z
source share