title: at least one checkbox must stay selected on deselect action of one of them
body: <p>I have a few checkboxes on a form and i want to validate them when deselecting every one of them. So at least one checkbox must stay selected on deselect event.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function validateCBox() {
  var checkBoxes = document.getElementsByClassName('myCBox');
  var isChecked = false;
      for (var i = 0; i &lt; checkBoxes.length; i++) {
          if ( checkBoxes[i].checked ) {
              isChecked = true;
          };
      };
      if ( isChecked ) {
          alert( 'checked!' );
          } else {
              alert( 'please check at least one checkbox!' );
          }   
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form&gt;
    &lt;input type = "checkbox" class='myCBox' value = "a"&gt;1
    &lt;input type = "checkbox" class='myCBox' value = "b"&gt;2 
    &lt;input type = "checkbox" class='myCBox' value = "c"&gt;3
    &lt;input type = "checkbox" class='myCBox' value = "d"&gt;4
  &lt;/form&gt;
  &lt;input type = "button" value = "Edit and Report" onClick="validateCBox()"&gt;</code></pre>
  </div>
  </div>
  </p>