$.validator.addMethod not recognized

$.validator.addMethod not recognized

Hi,
I am developping a webApp in Groovy Grails Tools Suite and i am trying to use the jQuery validation plugin to validate a field in my HTML.
the problem is that even if i added the library in my project, the validator.addMethod is not recognized.
Here is the part that don't work in my .js code:

  1. $( document ).ready(function() {

  2. $.validator.addMethod("regex",function(value, element, regexp) {
  3.        var re = new RegExp(regexp);
  4.        return this.optional(element) || re.test(value);
  5.    }, "Format invalide"
  6. );
  7. $("form[name='EditionForm']").validate({
  8.    // Specify validation rules
  9.    rules: {
  10.      // The key name on the left side is the name attribute
  11.      // of an input field. Validation rules are defined
  12.      // on the right side
  13.     ReferenceMetier:{
  14.     required:true,
  15.     regex:/^[0-9]{11}[A-Z]{1}$/,    
  16.     },          
  17.    },
  18.    // Specify validation error messages
  19.    messages: {
  20.     ReferenceMetier:{
  21.     required:"Please enter your ReferenceMetier",
  22.     }
  23.    },
  24.    // Make sure the form is submitted to the destination defined
  25.    // in the "action" attribute of the form when valid
  26.    submitHandler: function(form) {
  27.      form.submit();
  28.    }
  29.  });
  30. });
and here is the part of my .html code that uses the .js :

  1. <form method="post" name="EditionForm" id="EditionForm"  >
  2. <div class="Separateur">
  3. <b><h2>Saisie Separateur</h2></b>
  4. <label id="date_recep" for="DatePicker">Date de reception</label> : <input type="text" class="DatePicker" name="DatePicker" id="DatePicker" size="30" maxlength="30"/>
  5. <label id="dest" for="Destinataire">Destinataire</label> : <input type="text" name="Destinataie" id="Destinataire" placeholder="" size="30" maxlength="30"/>
  6. <label id="grpdest" for="GroupeDestinataire">Groupe Destinataire</label> : <input type="text" name="GroupeDestinataie" id="GroupeDestinataire" placeholder="" size="30" maxlength="30"/>
  7. <label id="refmetier" for="ReferenceMetier">Reference Metier</label> : <input type="text" name="ReferenceMetier" id="ReferenceMetier" placeholder="" size="30" maxlength="30" required/>
  8. </br>
  9. </br>
  10. </div>
  11. </form>
and now the chrome error message:

editionintercalaire.js:53 Uncaught TypeError: Cannot read property 'addMethod' of undefined
    at HTMLDocument.<anonymous> (editionintercalaire.js:53)
    at l (jquery-1.8.3.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.8.3.min.js:2)
    at Function.ready (jquery-1.8.3.min.js:2)
    at HTMLDocument.A (jquery-1.8.3.min.js:2)

ask if i forgot something, thx for helping anyway.