JSFiddle - React, Tailwind, and code Playground
by Superman
HTML
<input type="radio" name="option_layout" value="0" />
<input type="radio" name="option_layout" value="1" />
JavaScript
//radio group validation
if (!$("input[@name='option_layout']:checked").val()) {
alert('Nothing is checked!');
return false;
}
else if ($("input[@name='option_layout']:checked").val()) {
alert('One of the radio buttons is checked!');
return false;
}