Bootstrap: [BUG] Form input with input-group-prepend and valid-feedback/invalid-feedback lose border radius

Created on 28 Sep 2019  路  5Comments  路  Source: twbs/bootstrap

The border-radius is not rounded when form with input-group-prepend and (valid-feedback or invalid-feedback) lose border-radius.

Normally with input-group-prepend only:
2019-09-28

Normally with invalid-feedback only:
2019-09-28 (1)

But with both input-group-prepend and invalid-feedback lose border-radius on the right side:
2019-09-28 (2)

Code that regenerate the border bug:

<div class="col-md-4 mb-3">
  <label for="validationCustomUsername">Username</label>
  <div class="input-group">
    <div class="input-group-append">
      <span class="input-group-text" id="inputGroupPrepend">@</span>
    </div>
    <input type="text" class="form-control" id="validationCustomUsername" placeholder="Username" aria-describedby="inputGroupPrepend" required>
    <div class="valid-feedback">
      Please choose a username.
    </div>
  </div>
</div>

You can see the bug in Bootstrap document too
https://getbootstrap.com/docs/4.3/components/forms/#custom-styles

Most helpful comment

I reopen a similar issue since the bug remains in bootstrap 4.4 https://github.com/twbs/bootstrap/issues/30116

All 5 comments

This happens because of

<div class="invalid-feedback">
  Please choose a username.
</div>

as last child inside .input-group

Oh I see! I understand now.

Sorry... But I personally didn't get... What's workaround for it?
I mean if I want a div with a 'invalid-feedback' to be present in order to show that this error belongs to this field..
Any decision for this? It should be outside the 'input-group' ?

The solution of this is add a .rounded-right in input.
See: https://tatlead.com/bootstrap/BUG-FormInputBorderRadius.html

I reopen a similar issue since the bug remains in bootstrap 4.4 https://github.com/twbs/bootstrap/issues/30116

Was this page helpful?
0 / 5 - 0 ratings