JSFiddle - React, Tailwind, and code Playground
HTML
<form action="javascript:alert( 'success!' );">
<div>1:
<input type="checkbox" />
<br />2:
<input type="checkbox" />
<br />
<input type="submit" />
</div>
</form>
JavaScript
$("form").submit(function () {
var length = $('input[type=checkbox]').not(':checked').length;
if (length > 1) {
alert("Please select at least one to upgrade.");
return false;
}
});