Maximum Call Stack Size Exceeded When Changing A Class - Bootstrap, Jquery
I'm using jQuery 2.1.1, jQuery UI 1.11, Bootstrap 3.2, Fuel UX 2.3 (for the form wizard only) and BootstrapValidator v0.5.1-dev. I have a huge bootstrapped form in a Fuel UX Wizard
Solution 1:
If your form is NOT structured by Bootstrap classes (the element containing field and associated label does NOT have form-group class), you will see the error :
Uncaught RangeError: Maximum call stack size exceeded
Reference : Maximum call stack size exceeded error warning in the official docs.
Solution 2:
All fields mentioned under the bootstrapValidator
function should have a parent with form-group
class.
So it should be like this.
<div class="form-group">
<labelclass="col-lg-3 control-label">No of bottles out for delivery</label><divclass="col-lg-5"><inputtype="text"value=""class="form-control"maxlength="3"name="bottles_out_for_delivery"></div></div><divclass="form-group"><labelclass="col-lg-3 control-label">No of bottles returned</label><divclass="col-lg-5"><inputtype="text"value=""class="form-control"maxlength="3"name="bottles_returned"></div></div>
$('#add_bulk_delivery_form').bootstrapValidator({fields: {
bottles_out_for_delivery: {
validators: {
notEmpty: {
message:'Bottles out for delivery field can\'t be empty'
},
regexp: {
regexp:/^[0-9]+$/,
message:'Bottles out for delivery can only contan numbers'
}
}
}
}
});
Post a Comment for "Maximum Call Stack Size Exceeded When Changing A Class - Bootstrap, Jquery"