Javascript bootstrapvalidator给出了;无法读取属性';集团';“未定义”的定义;关于编辑域
我正在文本区域上使用ckeditor,需要设置自定义验证 下面的示例中,我使用jquery适配器以如下方式设置文本框:Javascript bootstrapvalidator给出了;无法读取属性';集团';“未定义”的定义;关于编辑域,javascript,jquery,ckeditor,jqbootstrapvalidation,Javascript,Jquery,Ckeditor,Jqbootstrapvalidation,我正在文本区域上使用ckeditor,需要设置自定义验证 下面的示例中,我使用jquery适配器以如下方式设置文本框: $('#posteditor') .bootstrapValidator() .find('[name="text"]').ckeditor({ skin: 'moono,/asset/css/moono/', language: 'it', toolbarGroups: [ {"name"
$('#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', function() {
$('#posteditor')
.bootstrapValidator('updateStatus', 'text', 'NOT_VALIDATED')
.bootstrapValidator('validateField', 'text');
});
以这种方式在我的html中声明它
<form id="posteditor">
....
<textarea class="form-control" name="text" id="text"></textarea>
....
</form>
并且该字段未经验证
感谢您的帮助下面的功能很好
$('#posteditor')
.bootstrapValidator('updateStatus', $('#text'), 'NOT_VALIDATED')
.bootstrapValidator('validateField', $('#text'));
});
或
下面的工作很好
$('#posteditor')
.bootstrapValidator('updateStatus', $('#text'), 'NOT_VALIDATED')
.bootstrapValidator('validateField', $('#text'));
});
或
检查是否意外地将fv-*或bv-*属性添加到html页面中而不是表单中的任何字段 还要检查页面是否有多个同名输入框 因为,在验证时,验证器会选择页面中的所有字段,并在初始化中只处理带有字段名的输入
此外,您还可以使用解除bootstrapValidator.min.js的身份并自行调试以检查您的问题检查您是否意外地将fv-*或bv-*属性添加到html页面中而不是表单中的任何字段中 还要检查页面是否有多个同名输入框 因为,在验证时,验证器会选择页面中的所有字段,并在初始化中只处理带有字段名的输入 此外,您还可以使用对bootstrapValidator.min.js进行非透明化,并自行调试以检查问题
$('#posteditor').bootstrapValidator('revalidateField', $('#text'));