用于Bootstrap4 beta的SimpleForm 3初始化程序

时间:2017-08-14 14:37:15

标签: ruby-on-rails twitter-bootstrap ruby-on-rails-4 simple-form bootstrap-4

当前的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将类添加到字段包装器中。有没有办法更改初始化程序,因此它会在输入字段而不是字段包装器中添加错误类?

0 个答案:

没有答案