BootstrapValidator引发的too much recursion

简介: BootstrapValidator引发的too much recursion

自从使用了BootstrapValidator之后,感觉非常漂亮,但却引发了很多个bug,too much recursion就是其中一种。


错误代码


<label>账户</label>
<input class="form-control" type="text" autofocus name="username" placeholder="请输入会员编号" autocomplete="off"
    data-bv-notempty />
<label>密码</label>
<input class="form-control" type="password" name="password"  placeholder="请输入登陆密码" data-bv-notempty/>
<div class="checkbox">
    <label> <input type="checkbox" value="1" /> 记住我的账号
    </label>
</div>

这样的写法对于BootstrapValidator是不符合规则的,虽然这样的写法看起并没有什么错误,但运行的时候就会提示too much recursion错误,那么经过多番调试后,发现,如果要使用BootstrapValidator,那么对于上面代码中的“账户label”和“账户 input”就必须加入到一个class为“form-group”的div中。


正确代码

<div class="form-group">
    <div class="row">
        <label>账户</label>
        <input class="form-control" type="text" autofocus name="username" placeholder="请输入会员编号" autocomplete="off"
            data-bv-notempty />
    </div>
</div>
<div class="form-group">
    <div class="row">
        <label>密码</label>
        <input class="form-control" type="password" name="password" autocomplete="off" data-bv-notempty placeholder="请输入登陆密码" />
    </div>
</div>
<div class="form-group">
    <div class="row">
        <div class="checkbox">
            <label> <input type="checkbox" value="1" /> 记住我的账号
            </label>
        </div>
    </div>
</div>
<div class="form-group">
    <div class="row">
        <button class="btn btn-lg btn-primary btn-block" type="submit">提交</button>
    </div>
</div>
相关文章
|
数据安全/隐私保护
BootstrapValidator引发的too much recursion
版权声明:欢迎转载,请注明沉默王二原创。 https://blog.csdn.net/qing_gee/article/details/49180703 自从使用了BootstrapValidator之后,感觉非常漂亮,但却引发了很多个bug,too much recursion就是其中一种。
1004 0
ReferenceError: document is not defined
ReferenceError: document is not defined
70 0
|
前端开发 JavaScript
bootstrapValidator的使用
bootstrapValidator的使用
70 0
|
Python
Indirect recursion
Indirect recursion 是指在函数调用中,函数体内部调用另一个函数,而这个被调用的函数又调用了该函数本身,形成了递归调用。这种递归调用是通过间接的方式实现的,因此被称为间接递归。 使用间接递归可以使代码更加简洁和易于理解。例如,考虑一个计算阶乘的函数,使用直接递归的实现方式会比较复杂,而使用间接递归则可以很简单地实现。
77 5
|
Linux C++
O_RDONLY/O_NOATIME undeclared (first use in this function
O_RDONLY/O_NOATIME undeclared (first use in this function
179 0
O_RDONLY/O_NOATIME undeclared (first use in this function
ReferenceError: self is not defined
ReferenceError: self is not defined
549 0
|
9月前
|
小程序 JavaScript
Avoid mutating a prop directly since the value will be overwritten whenever the parent comp
Avoid mutating a prop directly since the value will be overwritten whenever the parent comp
|
程序员
Uncaught ReferenceError: Invalid left-hand side in assignment
Uncaught ReferenceError: Invalid left-hand side in assignment
439 0
ReferenceError: _dirname is not defined
ReferenceError: _dirname is not defined
100 0
|
9月前
|
JavaScript
鬼火起~为什么报错[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the
鬼火起~为什么报错[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the

热门文章

最新文章