1,设置excluded配置
$("#formAppointment").bootstrapValidator({
message: '输入值不合法',
//excluded:[":hidden",":disabled",":not(visible)"] ,//bootstrapValidator的默认配置
excluded: [":disabled"],//关键配置,表示只对于禁用域不进行验证,其他的表单元素都要验证
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
appointmentName: {
message: '主访人不合法',
validators: {
notEmpty: {
message: '主访人不能为空'
},
stringLength: {
min: 3,
max: 30,
message: '请输入3到30个字符'
},
regexp: {