Bootstrap 输入类型=数字的验证器插件错误

Bootstrap validator plugin error with input type=number

当我加载页面时 Bootstrap 验证器插件显示错误

Uncaught RangeError: Maximum call stack size exceeded at String.replace ().

当我删除输入的名称属性时,没有错误。相同的代码在另一个页面上工作,即通过使用相同的验证器和 jquery 文件。我只提取了这段代码,但它仍然显示错误。

这是代码

<html>
    <head>
        <title>title</title>
        <!-- Bootstrap -->
        <link href="http://localhost/my_sites/suzuki/web-reports/plugins/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
        <!-- validator -->
        <link href="http://localhost/my_sites/suzuki/web-reports/plugins/validator/bootstrapValidator.min.css" rel="stylesheet" />
    </head>
    <body>

        <form id="f" action="f.php" method="post" >
          <input type="number" id="b" name="b" value="0" />
          <input type="submit" id="a" name="a" class="btn btn-primary pull-right" value="Save" />
        </form>

        <!-- jQuery --> 
        <!--jQuery v2.2.4--> 
        <script src="http://localhost/my_sites/suzuki/web-reports/plugins/jquery/dist/jquery.min.js"></script> 
        <!-- Bootstrap -->
        <!--Bootstrap v3.3.6-->
        <script src="http://localhost/my_sites/suzuki/web-reports/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
        <!-- validator --> 
        <!--@version     v0.5.3, built on 2014-11-05 9:14:18 PM--> 
        <script src="http://localhost/my_sites/suzuki/web-reports/plugins/validator/bootstrapValidator.min.js"></script>

        <script>
            $(document).ready(function() {
                $('#f').bootstrapValidator();
            });        
        </script>

    </body>
</html>

这里是错误

Uncaught RangeError: Maximum call stack size exceeded at String.replace () at fa (jquery.min.js:2) at Function.fa.matches (jquery.min.js:2) at Function.n.filter (jquery.min.js:2) at z (jquery.min.js:2) at n.fn.init.is (jquery.min.js:2) at b._getMessageContainer (bootstrapValidator.min.js:11) at b._getMessageContainer (bootstrapValidator.min.js:11) at b._getMessageContainer (bootstrapValidator.min.js:11) at b._getMessageContainer (bootstrapValidator.min.js:11)

如果您的表单不是由 Bootstrap classes 构建的(包含字段和关联标签的元素没有 form-group class),您将看到错误。 通过这个jsfiddle。你会得到一个解决方案

[1]: http://jsfiddle.net/Arkni/x7pooh99/