JSFiddle - React, Tailwind, and code Playground

HTML

<form>
    <label>
        <input type='radio' name='fruit' value='apple' required >
        Apple
    </label>
    <label>
        <input type='radio' name='fruit' value='banana' required >
        Banana
    </label>
    <label>
        <input type='radio' name='fruit' value='orange' required >
        Orange
    </label>
    <input type='submit'>
</form>

JavaScript

$('form').attr('novalidate', true);

$('form').submit(function(e) {
    e.preventDefault();
    if(!$('input[name="fruit"]:checked').val()) {
        $('input[name="fruit"]')[0].setCustomValidity("Please select one of the fruits.");
        this.reportValidity();
        return;
    }
    this.submit();
});