title: Regex and jQuery: lower case
body: <p>I would like to validate my form with jquery validation plugin.
  I added a method for on input:</p>
  
  <pre><code>$.validator.addMethod("testRegex", function(value, element) {
      return this.optional(element) || /^[a-z0-9-_]+$/i.test(value);
  }, "test must contain only letters, numbers, underscores or dashes");
  </code></pre>
  
  <p>But I want a validation to check if the value is only lowercase. And This validation doesn't work.</p>
  
  <p>Do you have an idea?</p>