jqbootstrapvalidation

bootstrapvalidator gives “Cannot read property 'group' of undefined” on ckeditor field

佐手、 提交于 2019-12-07 00:45:30
I'm using ckeditor on a text area and I need to set a custom validation. Following the example, I set the textbox using the jquery adapter in this way: $('#posteditor') .bootstrapValidator() .find('[name="text"]').ckeditor({ skin: 'moono,/asset/css/moono/', language: 'it', toolbarGroups: [ {"name":"basicstyles","groups":["basicstyles"]}, {"name":"paragraph","groups":["list","align"]}, {"name":"insert","groups":["insert"]}, {"name":"styles","groups":["styles"]}, {"name":"links","groups":["links"]}, ], removeButtons: 'Strike,SpecialChar,Anchor', extraPlugins: 'youtube' }).editor.on('change',

bootstrapValidator: How do you add and remove validators dynamically to an existing input field?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 10:47:56
I have a dynamic form that is bound with knockout.js and validated by bootstrapValidator . There is one input field that needs to be 'required-validated' dependent on the state of another control. The input field: <textarea id="inputReason" name="inputReason" rows="3" class="form-control col-lg-8" data-bind="value: Reason" /> The relevant javascript part of the knockout-viewmodel: self.SelectAbsenceType = function (absenceType) { self.SelectedID(absenceType.ID); if (self.SelectedAbsenceType().ReasonRequired) { $('#formCreate').bootstrapValidator('addField', 'inputReason', { validators: {

How to set minSize in Bootstrap Validator

天涯浪子 提交于 2019-12-06 05:19:39
I'm trying to figure out how to set the minSize for a file upload using Bootstrap Validator plugin. Given the following code, I can set the maxSize maxSize , but not minSize $(document).ready(function () { $('#test').bootstrapValidator({ live: 'enabled', fields: { fileupload: { validators: { file: { extension: 'png', type: 'image/png', maxSize: 1024 * 1024, message: 'The selected file is not valid, or the size is not large enough!' } } } } }); }); Is there a way to set it for minSize? as nghuuphuoc/bootstrapvalidator validators: { file: { extension: 'png', type: 'image/png', minSize: 1024*1024

Bootstrap validator for modal doesnt reset Form

£可爱£侵袭症+ 提交于 2019-12-04 10:11:56
I am using bootstrap validator for my form inside modal.The validator gets retained on subsequent form access. For example if the do the following operation Access form enter some valid value and submit the form. Access the form again the color of the field still remain in green , since i entered a valid entry in my previous form submission <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">

How to create a custom validation in Bootstrap Validation

拥有回忆 提交于 2019-12-01 06:16:14
问题 My Goal is to validate a specific text field where this field is dependent to the value of the other element. For example i have select tag and input text tag, input text is required when select tag has a selected value. hope someone could help. 回答1: Take a look at http://bootstrapvalidator.com/ In our project we are using, Backbone validator, integrated with Bootstrap https://github.com/thedersen/backbone.validation Sample of integration Backbone.validation & Bootstrap [jsfiddle.net

Stopping default form submit in Bootstrap Validator Form

依然范特西╮ 提交于 2019-11-28 00:48:50
问题 I have seen this asked a couple of times, but they don't seem to apply in my situation. My form is being submitted before the validation is tested. form: <form accept-charset="UTF-8" action="/user/fact" data-bv-submitbuttons="button[type='submit']" data-remote="true" data-toggle="validator" id="user_fact_form" method="post" role="form"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div> <div class="form-group"> <label for="key">Title</label>