boostrapvalidator textarea验证始终为绿色

时间:2017-04-07 22:38:10

标签: twitter-bootstrap-3 bootstrapvalidator

我有这个textarea代码:

<div class="col-md-10">
<textarea class="form-control" cols="20" id="Op_Question" name="Op_Question" rows="2" data-bv-field="Op_Question"></textarea>
</div>

我正在使用bootstrapvalidator的代码:

            Op_Question: {
                validators: {
                    notEmpty: {
                        message: 'The Question is required and cannot be empty'
                    },
                    stringLength: {
                        max: 500,
                        message: 'Post content must be less than 120 characters'
                    }
                }
            }

问题是,bootstrap验证器总是绿色,即使textarea为空,为什么会发生这种情况呢?

干杯

0 个答案:

没有答案