has-danger no longer working on Bootstrap v4 beta?

前端 未结 3 794
难免孤独
难免孤独 2020-12-10 03:44

According to the Bootstrap migration guide:

Renamed .has-error to .has-danger.

However, that doesn\'t seem to work. Border and t

3条回答
  •  情深已故
    2020-12-10 04:23

    Managed to get it to work. @ZimSystem is correct about this.

    .has-danger exist in Alpha version but it was removed in Bootstrap v4 Beta. You will need to use is-invalid selector in the input and also include class="invalid-feedback" for error message.

    Here is example:

    Sorry, that username's taken. Try another?

提交回复
热议问题