I have tried in several ways but I have not succeeded in creating a window.alert (); com return false; if no select field of name="product_qtd []" is selected or if it does not exist, but to no avail, I have checked in here and no response has adapted to what I need.
Example:
<select name="produto_qtd[]" class="form-control">
<option value="">Produto X - Selecione quantidade</option>
<option value="10">10 itens</option>
<option value="20">20 itens</option>
<option value="50">50 itens</option>
</select>
<select name="produto_qtd[]" class="form-control">
<option value="">Produto Y - Selecione quantidade</option>
<option value="10">10 itens</option>
<option value="20">20 itens</option>
<option value="50">50 itens</option>
</select>
Or if the select does not exist, also check and return a window.alert (); and return false; reporting "No quantity selected," only.
There are cases where the select related to the product disappears due to the declared value of the product being higher than the contract plan, and other cases the select exists but no value with value was selected.