Topic: Multiselect with `required` attribute
Hi, I'm trying to create a form with mandatory multiselect: I want the user to be required to select at least one value (see snippet). If I try to submit the form without selecting anything in the multiselect, no validation popup is displayed and the browser console shows the following error: An invalid form control is not focusable.
Expected behavior
When you submitting a form, a popup "This field is required" should appear, like it does with text inputs.
Resources (screenshots, code snippets etc.)
https://mdbootstrap.com/snippets/standard/ilya/6223388
Kamila Pieńkowska staff answered 4 months ago
I've prepared working example for you: https://mdbootstrap.com/snippets/standard/kpienkowska/6225607
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 6.4.2
- Device: Laptop
- Browser: Firefox 129.0.1
- OS: Linux
- Provided sample code: No
- Provided link: Yes