title: Adding validation to an HTML select box
body: <p>I want to make one simple validation check on my HTML form. I'd like it so that if the user chooses the 18 - 24, an error appears next to the drop down select: 'You must be 25+'.</p>
  
  <pre><code>&lt;select class="element select medium" id="element_3" name="element_3"&gt; 
  &lt;option value="" selected="selected"&gt;&lt;/option&gt;
  &lt;option value="1" class="error" id="error"&gt;18 - 24&lt;/option&gt;
  &lt;option value="2" &gt;25 - 34&lt;/option&gt;
  &lt;option value="3" &gt;35 - 44&lt;/option&gt;
  &lt;option value="4" &gt;45 +&lt;/option&gt;
  </code></pre>
  
  <p>I've tried adding both a class and ID to value 1. Then I tried something like:</p>
  
  <pre><code>function hidestuff(page){
     document.getElementById(error).style.visibility="hidden";
  }
  
  function showstuff(error){
     document.getElementById(error).style.visibility="visible";
  }
  </code></pre>
  
  <p>Attempting to toggle show and hide with JavaScript. Hoping something like if on page ID hide this message, when error div toggled display. But this didn't work. I did add the corresponding CSS too. Any pointers on how to write this correctly?</p>