title: jQuery validator add method undefined
body: <p><a href="https://jsfiddle.net/c50m4pos/1/" rel="nofollow">https://jsfiddle.net/c50m4pos/1/</a></p>
  
  <p>Simple validator works, but once i get to add a little more things like above, things starts to act strange.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function($) {
  
  
  
    $('#testform').validate({
      rules: {
        testinput: {
          required: true,
          textonly: true,
          messages: {
            required: 'Input is required'
          }
        }
      }
  
    });
  
    $.validator.addMethod(
      "textonly",
      function(value, element) {
        var valid = false;
        var check = /[^-'\.a-zA-Z0-9\s\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02AE]/.test(value);
        if (check == false)
          valid = true;
        return this.optional(element) || valid;
      },
      "Please only enter letters, digits, spaces, periods, or hyphens."
    );
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.15.0/jquery.validate.min.js"&gt;&lt;/script&gt;
  
  &lt;form id="testform"&gt;
    &lt;p&gt;
      &lt;label&gt;testinput 1&lt;/label&gt;
      &lt;label for="testinput" class="error" id="testinput-error"&gt;&lt;/label&gt;
      &lt;input id="testinput" name="testinput"&gt;
    &lt;/p&gt;
  
    &lt;button type='submit'&gt;
      Submit
    &lt;/button&gt;
  
  
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Safari Returns error</p>
  
  <blockquote>
    <p>[Error] TypeError: undefined is not an object (evaluating 'a.validator.methods[d].call').  Exception occurred when checking element testinput, check the 'messages' method. </p>
  </blockquote>
  
  <p>Firefox says</p>
  
  <blockquote>
    <p>TypeError: a.validator.methods[d] is undefined ...f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,</p>
  </blockquote>
  
  <p>The new method "textonly" works, and it displays the error message gracefully. However, when the input field is re-validated( you re-input text without illegal characters), the error occurs.</p>
  
  <p>I've tried adding "textonly" custom message under textinput rules but it still errors.
  How do i fix this?</p>