Reputation: 487
I updated jQuery 1.8.3
to latest version and jQuery validation engine stopped working. I tested it with 1.8.3+ (any version) but it doesn't work.
JS:
$(document).ready(function() {
$("#source").select2({
closeOnSelect: false,
formatResult: format,
formatSelection: format,
blurOnChange: true
});
$('#testform').validationEngine({ prettySelect: true, usePrefix: 's2id_', autoPositionUpdate: true });
});
function format(state) {
// Update: Made it work by changing "state.element" to $(state.element).
var originalOption = $(state.element);
return originalOption.data('foo') + " " + state.text;
}
How do I fix this ?
Demo in JSfiddle (changed to jQuery 1.8.3) validation worked.
Upvotes: 0
Views: 162
Reputation: 388416
The problem is the usage of .live() method in validate engine 2.6 which was removed in jQuery 1.9.
You can update the validate engine to 2.6.2 or latest where it is fixed by using .on()
Upvotes: 1