当前的Bootstrap 4 beta将错误类属性直接添加到输入标记,如下所示:
<div class="col-md-6 mb-3">
<label for="validationServer03">City</label>
<input type="text" class="form-control is-invalid" id="validationServer03" placeholder="City" required>
<div class="invalid-feedback">
Please provide a valid city.
</div>
</div>
然而,
SimpleForm将类添加到字段包装器中。有没有办法更改初始化程序,因此它会在输入字段而不是字段包装器中添加错误类?