title: Checkbox JavaScript Validation
body: <p>I'm working on validating the following code so that onsubmit, the user should have selected at least one checkbox. How would I validate the following checkboxes in JavaScript?</p>
  
  <pre><code>&lt;input type="checkbox" name="dare" value="q1"/&gt; I dare you to say the alphabet backwards &lt;br&gt;
  
    &lt;input type="checkbox"  name="dare" value="q2"/&gt; I dare you to go to a random person and sing twinkle twinkle little star &lt;br&gt;
  
    &lt;input type="checkbox" name="dare" value="q3"/&gt; I dare you to act your true self for a day&lt;br&gt;
  
    &lt;input type="checkbox" name="dare" value="q4"/&gt; I dare you to not shower for a week &lt;br&gt;
  
    &lt;input type="checkbox" name="dare" value="q5"/&gt; I dare you to go vegetarian for 3 months&lt;br&gt;
  
    &lt;input type="checkbox" name="dare" value="q6"/&gt; I dare you to swim with dolphins &lt;br&gt;
  
    &lt;input type="checkbox" name="dare" value="q7"/&gt; I dare you to climb a mountain &lt;br&gt;
  
   &lt;input type="checkbox" name="dare" value="q8"/&gt; I dare you to not sleep for a day&lt;br&gt;
  
      &lt;input type="checkbox" name="dare" value="q9"/&gt; I dare you to walk backwards through the park &lt;br&gt;
  
      &lt;input type="checkbox" name="dare" value="q10"/&gt; I dare you to jump 50 times. &lt;br&gt;
  </code></pre>
  
  <p>Some of the other validation codes that have been shared on this forum doesn't work for me.</p>