Default option value of dropdown issue

<select name="WSType" required validate>
                <option value="">Select</option>
                <option value="WS">Wholesaler</option>
                <option value="R">Retailer</option>
                <option value="C">Online Seller</option>
                <option value="O">Others</option>
              </select>

Form validation not working if option value is blank.
var WSType = $$(’#addwholesaler-form select[name=WSType]’).val();
When I print the value, it prints “Select”. That is why required attribute is not working.

Expected value should be blank and form should show validation error.

Please help…

Select can’t be validated because empty string is still a value. You need to validate it manually then

Thanks for the reply!

In normal HTML if we set value="" then it is treated as invalid input.

Why this behaviour changed in framework7?

I did a manually value check and alert the error but it did not satisfy me.

How will you do this in a better way if it can’t be fixed in framework7? Your suggestions will be really helpful and will appreciate it.

It is not framework7 doing it, this how default validation works in browser