bootstrapValidator中threshold不生效和remote验证的delay不生效

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;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值