You can validate the radio button in a form is selected or not with the help of javascript.
<div class="radio-buttons">
<div class="male">
<input class="form-radio" type="radio" name="gender" id="radio1" value="male">
<label class="form-check-label" for="radio1">Male</label>
</div>
<div class="female">
<input class="form-radio" type="radio" name="gender" id="radio2" value="female">
<label class="form-check-label" for="radio2">Female</label>
</div>
</div>
Here you can check it by document.querySelectorAll() with the help of attribute name, Continue reading “How to check radio button is checked/selected or not by Javascript only?”
