This is how the error message is getting displayed once the validations are added. It only takes the width of that div. How can I change the width so the error message fits a single line? If there's any other way to do front-end validations please suggest it.
.age {
width: 53px;
font-weight: 700;
font-size: 16px;
letter-spacing: 0.15px;
color: rgba(0, 0, 0, 0.6);
}
.input-group {
margin-bottom: 9px;
position: relative;
}
.input-group__label {
z-index: 5;
display: block;
position: absolute;
top: 0;
line-height: 40px;
color: #aaa;
left: 5px;
padding: 0 7px;
transition: line-height 200ms ease-in-out, font-size 200ms ease-in-out, top 200ms ease-in-out;
pointer-events: none;
font-weight: 700;
font-size: 16px;
letter-spacing: 0.15px;
color: rgba(0, 0, 0, 0.6);
}
.input-group__input {
width: 100%;
height: 40px;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 4px !important;
padding: 0 10px;
}
<div class="input-group age">
<input class="input-group__input form-control is-invalid"
type="text"
placeholder=" "
name="age"
id="validationError"
autocomplete="off"
required />
<label class="input-group__label" for="age">Age</label>
<div class="invalid-feedback">
Please enter an age between 35-74
years.
</div>
</div>
