Topic: mdb-select validation
m.hamacher priority asked 6 years ago
Hello,
I have a problem with form validation.
I'm using the mdb-select multiple times and at no point the validation is working. With all other fields everything is fine, but the select neither colored red nor shows the invalid-feedback. My implementation is below. With the text-field it works perfectly but not with the select.
Thanks for help.
<div class="md-form form-group mt-5"> <input class="form-control w-25 invalid is-invalid" type="text" name="schoolcode" id="schoolcode" required=""> <label for="schoolcode">School-Code</label> <div class="invalid-feedback"> Please enter your School-Code </div> </div> <label for="class">Class</label> <select class="mdb-select w-25 invalid is-invalid" id="class" name="class" style="width: 260px;"> <option value="1">1</option> <option value="2">2</option> </select> <div class="invalid-feedback"> Please select your class. </div>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Opened
Specification of the issue
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: 4.5.10
- Device: MacBook Pro
- Browser: Chrome
- OS: macOs High Sierra
- Provided sample code: No
- Provided link: No
Piotr Glejzer staff commented 6 years ago
Hi, select is not working because validation only working with inputs. We don't have that what you need. We are very sorry about that. We will think more about that. Best, PiotrPiotr Glejzer staff commented 6 years ago
You can always check our documentation about 'forms validation' https://mdbootstrap.com/components/bootstrap-form-validation/ Have a nice day.