title: jQuery validate plugin : custom rules with dynamic element id
body: <p>I have attempted to apply a custom validation rule using jQuery as below</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  jQuery.validator.addMethod("notaccept", function(value, element, param) {
  return value.match(new RegExp("." + param + "$"));
  }, "&lt;img src='../template/images/error.gif' alt='Only alphabet allowed.'&gt;");
  
  $("#frm1").validate({
    rules: {
      $('input[id^=txt_field]'): { 
          notaccept: "[a-zA-Z]+" }        
    }
  });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The issue is the usage of element prefix selector in the above code doesn't work. I generate multiple field of the format <code>txt_field11</code>, <code>txt_field12</code> and so on dynamically. </p>
  
  <p>Can I apply the above validation on multiple elements as in my case?</p>