title: genvalidator: check for checkbox in form validation
body: <p>I'm using <a href="http://www.javascript-coder.com/html-form/javascript-form-validation.phtml" rel="nofollow">genvalidator</a> to have some tests on input fields in a form. Problem is I can't find a way to test if a checkbox has been checked. This is how all the fields are set:</p>
  
  <pre><code>frmvalidator.addValidation("name","req","Insert your name"); 
  frmvalidator.addValidation("city","req","Insert your city"); 
  frmvalidator.addValidation("phone","req","Insert your phone number");
  </code></pre>
  
  <p>This is my checkbox</p>
  
  <pre><code>&lt;input type="checkbox" name="agree" id="agree "value="yes"/&gt;
  </code></pre>
  
  <p>How can I make it mandatory with genvalidator?</p>
  
  <p>This is the part that handles the form process (in short: if there aren't errors, it's ok):</p>
  
  <pre><code>if(empty($name)||empty($city)||empty($phone)||BLAHBLAH)
  {
      $errors .= "\n Mandatory field. ";
  }
  
  
  if(empty($errors))
  {
      // send the email
  }
  </code></pre>
  
  <p>It tried with this JS code with no luck:</p>
  
  <pre><code>function validate(form) { 
  
  if(!document.form1.agree.checked){alert("Please check the terms and conditions");
   return false; } 
  
  
  return true;
  }
  </code></pre>
  
  <p>If possible I'd like to use genvalidator functions. :)</p>