title: Ruby On rails, check if the checkbox is not empty
body: <p>I have a checkbox and before I click on a submission button, I want to check if a checkbox is empty? if it is checked, a notification error should be shown.</p>
  
  <pre><code>&lt;script src="/assets/rails.validations.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;%= form_for Groupsnorm.new, url: what_to_do_arraydbs_path ,method: :get ,:validate =&gt; true do |f| %&gt;
    &lt;div class="field_label"&gt;
      &lt;%= f.label :group_name%&gt;:
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%=f.text_field :group_name %&gt;
    &lt;/div&gt;
  
    &lt;%= submit_tag "Submit", :commit =&gt;"pictures" %&gt; 
    &lt;% @files.each do |file| %&gt;                         
      &lt;p&gt;&lt;td&gt; &lt;%= check_box_tag "files[]", file.id %&gt;&lt;/td&gt;&lt;%= arraydb.arraydb_file_name %&gt;&lt;/p&gt;  
    &lt;%end%&gt;
  &lt;%end%&gt; 
  </code></pre>
  
  <p>and JavaScript looks something like this:</p>
  
  <pre><code>$(function validateCheckbox() {
    $('#notifications').ready(function() {
      $.notification( 
        {
          content: text,
          showTime: false,
          timeout: 5000,
          icon: "9",
        }
      );
    });
  });         
  </code></pre>
  
  <p>How is it possible to check if the checkbox is empty? Or is it possible to do a client side validation  so that "submit" button will not be clickable if checkbox is empty?</p>