mdb-ui-kit icon indicating copy to clipboard operation
mdb-ui-kit copied to clipboard

Form validation message does not wrap in input group

Open fullopt opened this issue 2 years ago • 6 comments

Hello,

I'm using MDB 6.2.0.

The .invalid-feedback class nested in .input-group is shown right to the input instead of being wrapped to the bottom and the input itself is shrunk:

image

fullopt avatar Mar 21 '23 16:03 fullopt

how can we reproduce this issue? Maybe it's enough to improve the structure of the HTML? See this example in the documentation: https://mdbootstrap.com/docs/standard/forms/validation/#section-basic-example. The email field is the input group and everything is in the right place.

gbujanski avatar Apr 04 '23 13:04 gbujanski

how can we reproduce this issue? Maybe it's enough to improve the structure of the HTML? See this example in the documentation: https://mdbootstrap.com/docs/standard/forms/validation/#section-basic-example. The email field is the input group and everything is in the right place.

Hi, thanks for your reply. This is how my row looks like - the input takes the whole row (its not in columns like in the example):

<div class="pt-1 pt-md-3 col-12 form-group"><div class="input-group"><span class="input-group-text"><i class="bi bi-person"></i></span><input type="text" name="username" class="form-control" placeholder="Používateľské meno alebo E-mail *" required="" autofocus=""><div class="invalid-feedback mt-2">Musí byť uvedené</div></div></div>

fullopt avatar Apr 04 '23 15:04 fullopt

I checked this code and input fills the entire width. After validation, feedback shows up on the input. But that's because you overwrote its margin top. I see you added the .form-group class as well. It is currently not used by us. Have you added any custom styles there or are you using another UI Kit that uses this class?

gbujanski avatar Jun 14 '23 13:06 gbujanski

Yes, I've been using .form-group class for historical reasons, currently it sets margin-bottom only. However in a meanwhile I've upgraded the MDB UI kit together with this fix what solved my problem:

.input-group { flex-wrap: wrap; }

It was set like this in the previous releases (prior to 6.2), but been broken afterwards. Please evaluate whether it would make sense to include to the upcoming releases. Thank you.

fullopt avatar Jul 03 '23 12:07 fullopt

I'm not sure what you mean. Has this code been removed? from what i can see it should still be available. Can you point to the specific place it was removed from?

gbujanski avatar Jul 19 '23 15:07 gbujanski

Please assign me

Kedarnath-Rothe avatar Oct 23 '23 16:10 Kedarnath-Rothe