1

我有这个文本区域代码:

<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>

我有这个引导验证器的代码:

            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'
                    }
                }
            }

问题是,引导验证器始终是绿色的,即使 textarea 为空,为什么会发生这种情况?

干杯

4

0 回答 0