title: jQuery validate: How to add a rule for regular expression validation?
body: <p>I am using the <strong><a href="http://en.wikipedia.org/wiki/JQuery" rel="noreferrer">jQuery</a> validation plugin</strong>. Great stuff! I want to migrate my existing ASP.NET solution to use jQuery instead of the ASP.NET validators. I am missing a replacement for the <strong>regular expression</strong> validator. I want to be able to do something like this:</p>
  
  <pre><code>$("Textbox").rules("add", { regularExpression: "^[a-zA-Z'.\s]{1,40}$" })
  </code></pre>
  
  <p>How do I <strong>add a custom rule</strong> to achieve this?</p>