When bootstrap-select creates a cloned element, it uses an addClass call that copies the validate[.*] class into the new div element, and validationEngine tries to validate that.
I got a solution without modifying the core js file. For this we need to use validationEngine
“prettySelect”,”usePrefix” options, and we need to add “id” to cloned element and also need to removed the “validate[required]” class from this element. The full code look likes this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
var prefix = "selectBox_"; jQuery(document).ready(function() { // for remove bootstrap-select validation and adding id to the element with prefix $('select').each(function() { $(this).next('div.bootstrap-select').attr("id", prefix + this.id).removeClass("validate[required]"); }); jQuery("#registration").validationEngine('attach',{ promptPosition: "bottomLeft", autoHidePrompt:true, prettySelect : true, usePrefix: prefix }); }); |
It works for me. DEMO HERE : http://www.scriptlodge.com/code_demos/validationEngine/