title: validating multiple textbox having same name with jquery validator validates only first input
body: <p>I am trying to validate the two inputs having same name with jquery validator ..</p>
  
  <pre><code>&lt;script src='
              http://code.jquery.com/jquery-latest.min.js '&gt;&lt;/script&gt;
              &lt;script src='http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js'&gt;&lt;/script&gt;
              &lt;script&gt;
              $(document).ready(function(){
  
              $('#frm').validate();
  
              $("[name=inp_text]").each(function(){
              $(this).rules("add", {
              required: true,
              checkValue: true
               });   
             });
  
                  $.validator.addMethod("checkValue", function(value, element) {
                  var response = ((value &gt; 0)&amp;&amp;(value &lt;= 100))||((value == 'test1')||(value =='test2'));
                 return response;
                 }, "invalid value");
  
              })
  
              &lt;/script&gt;
  
  
              &lt;form id='frm' method='post'&gt;
              &lt;input type='text' name='inp_text'/&gt;&lt;br&gt;
                  &lt;input type='text' name='inp_text'/&gt;&lt;br&gt;
              &lt;input type='submit' name=''/&gt;
              &lt;/frm&gt;
  </code></pre>
  
  <p>but when I run this code it only validates first inputs and second inputs gets simply ignored</p>
  
  <p>I have also tried using <code>&lt;input type='text' name='inp_text[]'/&gt;&lt;br&gt;</code> but still not working.</p>
  
  <p>what should I change...?</p>
  
  <p>Thanks in advance</p>