addField(field,options)
- field:表单元素的name
- options:校验规则
$("#editableEmailDIV").append(addEmailDiv());
$("#form-horizontal-edit").data('bootstrapValidator').addField('perEmail',{
validators: {
notEmpty: {
message: '邮箱号不能为空!'
},
regexp : {
regexp : /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/,
message: '请输入正确的邮箱!'
},
}
});