title: Error when taking the length of an input
body: <p>I want to use <code>.length</code> in this script, but when I add <code>.length</code>, the script fails.</p>
  
  <p>The input:</p>
  
  <pre><code>&lt;input type="text" name="myform" class="myform" placeholder="Full Name" value="" maxlength="20"  minlength="6" pattern="[a-zA-Z-']+.{6,40}"&gt;
  </code></pre>
  
  <p>Original (working) code : </p>
  
  <pre><code>if ($.trim($("input[name=myform]").val()) === "") {
      $("input[name=myform]").addClass("merror");
      return false;
  }
  });
  $("input").change(function() {
      $(this).removeClass("merror");
  }).trigger("change");
  </code></pre>
  
  <p>After adding <code>.length</code>: </p>
  
  <pre><code>if ($.trim($("input[name=myform]").length === 6)) {
      $("input[name=myform]").addClass("merror");
      return false;
  }
  
  $("input").change(function() {
      $(this).removeClass("merror");
  }).trigger("change");
  </code></pre>