I've been exploring the features of Bootstrap 4 - beta and I've noticed that when using .is-invalid
with .input-group
, it doesn't seem to be visible.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" />
<div class="form-group">
<label for="label">Label</label>
<div class="input-group">
<div class="input-group-addon">
label
</div>
<input type="text" value="" name="label" class="form-control is-invalid">
</div>
<div class="invalid-feedback is-invalid">
<strong>Invalid Label</strong>
</div>
</div>
How can you effectively show an invalid input message when using .input-group
?
One workaround is including the following CSS, but it does feel a bit unconventional.
.form-group.is-invalid {
.invalid-feedback {
display: block;
}
}