title: jQuery Validation rules and messages
body: <p>I'm having trouble setting ups the rules and messages for jQuery Validation.</p>
  
  <p>I'm trying to get the value from resume[zip_code], but I don't know how to write it in JQuery. I tried</p>
  
  <pre><code>rules: {
    resume[zip_code]: required: true
  }
  </code></pre>
  
  <p>but does not work.</p>
  
  <p>This is where I need to get the values from.</p>
  
  <pre><code>&lt;div class='control-group'&gt;&lt;label class='control-label'&gt;Zip Code: &lt;/label&gt;
    &lt;div class='controls'&gt;
      &lt;input class="required" type='text' name='resume[zip_code]'&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Application code</p>
  
  <pre><code>post '/create_resume' do
    session[:errors].clear
      @user = User.first(:email_address =&gt; session['user'])
      @resume = @user.resumes.new(params[:resume])
      @resume.save
  
    params[:education].each_key do |school|
      @school = @resume.educations.new(params[:education][school]
      @school.save
    end
  
    params[:job].each_key do |job|
      @job = @resume.jobs.new(params[:job][job])
      @job.save
    end
  
    params[:otherskill].each_key do |other|
      @otherskill = @resume.otherskills.new(params[:otherskill][other])
      @otherskill.save
    end
  
    if session[:errors].empty? === false
      erb :resume_form
    else
      session[:resume_output].clear
      erb :resume_output 
    end
  end
  </code></pre>
  
  <p>jQuery</p>
  
  <p>I know what the layout is but just don't know how to retrieve the values</p>
  
  <pre><code>$(#myForm).validate({
    rules: {
      something: key =&gt; value
    },
    messages: {
      something: "value"
    }
  });
  </code></pre>