Select with validation doesn't display the message


Topic: Select with validation doesn't display the message

gdw96 pro priority asked 2 months ago

Hello,

I'm encountering a bug, I'm trying to do form validation, I have select, so I added the following attributes to the select: data-mdb-validation="true" and data-mdb-invalid-feedback="My error".

In case of error I add the invalid class to the select, the borders turn red, but the message is not displayed. I looked in the HTML parser of my browser and the tags are added (even valid-feedback) but they remain in display: none;. Should I force the display of messages by adding the d-block class? But this is not very clean.

Thank you,


Grzegorz Bujański staff answered 2 months ago

Yes. Add class d-block. That should be enough.


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB 5
  • MDB Version: 3.2.0
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No