JSFiddle - React, Tailwind, and code Playground

HTML

<script>
       
function test() {
    if(document.getElementById('rdio2').checked==true) {
        return true;
     } else if(document.getElementById('rdio3').checked==true) {
        return true;
     } else if(document.getElementById('rdio4').checked==true) {
        return true;
     }  else {
        return confirm('are you sure?');
    }
}    
</script>
<form method="post" action="index.html" onSubmit="return test()">
    <input type="radio" name="rdio" id="rdio2" value="b"/>
    <input type="radio" name="rdio" id="rdio3" value="c"/>
    <input type="radio" name="rdio" id="rdio4" value="d"/>
    <input type="submit" value="Submit">
</form>