title: Jquery Validate Max Method With a Dynamic Value?
body: <p>I tried the script of <a href="http://jqueryvalidation.org/max-method/" rel="noreferrer">http://jqueryvalidation.org/max-method/</a>.. with examples of static values. how to use the max value but dynamic? 
  I tried with this script but it did not work</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery.validator.setDefaults({
    debug: true,
    success: "valid"
  });
  $( "#myform" ).validate({
    rules: {
      field: {
        required: true,
        max: "#field1" //from field1 dynamic value???
      //max: 23 //static value
      }
    }
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://jqueryvalidation.org/files/dist/jquery.validate.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://jqueryvalidation.org/files/dist/additional-methods.min.js"&gt;&lt;/script&gt;
  &lt;form id="myform"&gt;
      &lt;lable&gt;value1 : &lt;/lable&gt;
      &lt;input type="text" class="left" id="field1" name="field1"&gt;&lt;br&gt;
      &lt;lable&gt;no greater than value1 : &lt;/lable&gt;
      &lt;input type="text" class="left" id="field" name="field"&gt;
        &lt;br/&gt;
  &lt;input type="submit" value="Validate!"&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>how to work?</p>