// stylelint-disable-next-line no-duplicate-selectors
.input-group {
- > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
- > .dropdown-toggle:nth-last-child(n + 3) {
- @include border-right-radius(0);
+ &:not(.has-validation) {
+ > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
+ > .dropdown-toggle:nth-last-child(n + 3) {
+ @include border-right-radius(0);
+ }
}
> :not(:first-child):not(.dropdown-menu) {
For invalid fields, ensure that the invalid feedback/error message is associated with the relevant form field using `aria-describedby` (noting that this attribute allows more than one `id` to be referenced, in case the field already points to additional form text).
+To fix [issues with border radii](https://github.com/twbs/bootstrap/issues/25110), input groups require an additional `.has-validation` class.
+
{{< example >}}
<form class="row g-3">
<div class="col-md-4">
</div>
<div class="col-md-4">
<label for="validationServerUsername" class="form-label">Username</label>
- <div class="input-group">
+ <div class="input-group has-validation">
<span class="input-group-text" id="inputGroupPrepend3">@</span>
<input type="text" class="form-control is-invalid" id="validationServerUsername" aria-describedby="inputGroupPrepend3 validationServerUsernameFeedback" required>
<div id="validationServerUsernameFeedback" class="invalid-feedback">
</div>
<div class="col-md-4 position-relative">
<label for="validationTooltipUsername" class="form-label">Username</label>
- <div class="input-group">
+ <div class="input-group has-validation">
<span class="input-group-text" id="validationTooltipUsernamePrepend">@</span>
<input type="text" class="form-control" id="validationTooltipUsername" aria-describedby="validationTooltipUsernamePrepend" required>
<div class="invalid-tooltip">