Problem with select validation (required)


Topic: Problem with select validation (required)

perisiansmu premium asked 6 months ago

Expected behavior Validation should validate the value options, not the label of the value

Actual behavior We want to put the label for choosing the value option. It shouldn't flag it as valid as no value stated. Also it flag it as invalid with a value and no label.

Resources (screenshots, code snippets etc.)

<option value="">Please Choose</option> <!-- invalid --> 

<option value="Value"></option> <!-- valid -->

https://mdbootstrap.com/snippets/standard/perisiansmu/2522686?action=forum_snippet#html-tab-view


Arkadiusz Idzikowski staff commented 6 months ago

We will take a closer look at this problem. For now, you can try to disable the option with an empty value or use the placeholder option to add placeholder text for the select input.


Please insert min. 20 characters.