Topic: MDB Select Dropdown Validation

jerrytunin pro asked 6 years ago


Is there a way to do Select Dropdown validation? It appears that this field is skipped over when validating.

Edyta Dabrowska free answered 6 years ago


You can add any value ('default' for example) and use it to show the alert. Make sure that your select has browser-default class.

jerrytunin pro answered 6 years ago


Then it shows 2 select drop downs. The html one and mdb's pseudo drop down.

Edyta Dabrowska free answered 6 years ago


Have you tried overwriting it with: select { display: block important!; }

jerrytunin pro answered 6 years ago


It appears that: select { display: none; } Breaks browser based "require". Is there a way to fix this?

jerrytunin pro answered 6 years ago


Yes, I understand that but how can having a blank value trigger the built-in alert that the field needs filled out?

Edyta Dabrowska free answered 6 years ago


Yes, it is. This is kind of like placeholder option so you can change this.

jerrytunin pro answered 6 years ago


The first default option is both disabled and selected with a value="". Any other value is acceptable.

Edyta Dabrowska free answered 6 years ago


Hello, How do you want to validate the dropdown? Here you can find one solution. Let me know how it works for you. Regards,

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags