<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.