1、bootstrapValidator中threshold不生效
$('#signupForm').bootstrapValidator({ message: 'This value is not valid', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { workId: { threshold: 6, validators: { notEmpty: { message: '工号长度在6到8位之间!' }, stringLength: { min: 6, max: 8, message: '工号长度在6到8位之间!' }, regexp: { regexp: /^(\d)*$/, message: '工号只能为数字!' }, remote: { url: "/sys/userinfo/exist",// 后台处理程序 message: '用户已存在',//提示消息 type: "post", // 数据发送方式 dataType: "json", // 接受数据格式 data: { // 要传递的数据 workId: function () { return $("#workId").val(); } }, delay: '500' } } },
2、bootstrapValidator中remote验证的delay不生效(更换 @version v0.5.3)
/*! * BootstrapValidator (http://bootstrapvalidator.com) * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 * * @version v0.5.3, built on 2014-11-05 9:14:18 PM * @author https://twitter.com/nghuuphuoc * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc * @license Commercial: http://bootstrapvalidator.com/license/ * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ */
3、bootstrapValidator验证后台返回参数
if (!ObjectUtils.allNotNull(user)) { result.put("valid", true); return result; } result.put("valid", false); return result;