the checkbox required field validation in my code doesn't seem to get triggered on submit although the other input fields are validated. Can any of you check out what the hell's wrong in my code?
<div class="field">
<label class="label" for="custom_second">
<span><?php echo __('Item Delivery Options') ?></span>
</label>
<div class="control">
<?php foreach($deliveryOptionList as $key => $deliveryOptionItem): ?>
<label class="radio-inline">
<input class="radio validate-one-required-by-name" type="checkbox" name="rahahaha_data[delivery_options][]" value="<?php echo $key; ?>"> <?php echo $deliveryOptionItem; ?>
</label>
<?php endforeach; ?>
</div>
</div>
This is how the output looks like:
<div class="field">
<label class="label" for="custom_second">
<span>Item Delivery Options</span>
</label>
<div class="control">
<label class="radio-inline">
<input class="radio validate-one-required-by-name" type="checkbox" name="rahahaha_data[delivery_options][]" value="1"> Rahahaha - online payment</label>
<label class="radio-inline">
<input class="radio validate-one-required-by-name" type="checkbox" name="rahahaha_data[delivery_options][]" value="2"> Rahahaha - cash on delivery</label>
<label class="radio-inline">
<input class="radio validate-one-required-by-name" type="checkbox" name="rahahaha_data[delivery_options][]" value="4"> Sellers delivery</label>
<label class="radio-inline">
<input class="radio validate-one-required-by-name" type="checkbox" name="rahahaha_data[delivery_options][]" value="5"> Buyers pick-up</label>
</div>
Thanks guys