title: How to include jquery.validate.js file (in the local directory) and use it in the validation of form?
body: <p>I know that including<code>&lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"&gt;&lt;/script&gt;</code> will do the trick, but I'm not able to find out anywhere that how it can be done after downloading the file <code>jquery.validate.js</code> and paste it in local directory.</p>
  
  <p>I tried it by pasting <code>jquery.validate.js</code> file in the same directory as the validation file and using : <code>&lt;script src="jquery.validate.js"&gt;&lt;/script&gt;</code>, but it didn't work.</p>
  
  <p>The validation code is in register.phtml file and the <strong>script</strong> portion of it is:</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>&lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(document).ready(function () {
          // validate signup form on keyup and submit
          $("#registerForm").validate({
              rules: {
                  first_name: "required",
                  last_name: "required",
                  contact_no: {
                      required: true,
                      digits: true,
                      minlength: 10,
                      maxlength: 13,
                  },
                  email: {
                      required: true,
                      email: true,
                  },
                  invitation_code: {
                      required: true,
                  },
              },
              messages: {
                  first_name: "Please enter your First Name",
                  last_name: "Please enter your Last Name",
                  contact_no: {
                      required: "Please enter your Contact Number",
                      digits: "Please enter only digits(0-9)",
                      minlength: "Minimum 10 digits are required",
                      maxlength: "Maximum 13 digits are allowed",
                  },
                  email: {
                      required: "Please enter a valid Email address",
                      email: "Your email address must be in the format of name@domain",
                  },
                  invitation_code: {
                      required: "Please check your email for Invitation Code",
                  },
                 
              }
          });
          $("#email").keypress(function () {
              $('.error_msg1').hide();
          });
          $('#invitationCode').click(function () {
              document.getElementById('invitation').innerHTML = "";
          });
          $("#first_name").on('keyup', function(e) {
                  var val = $(this).val();
                  if (val.match(/[^a-zA-Z]/g)) {
                    $(this).val(val.replace(/[^a-zA-Z]/g, ''));
                  }
          });
          $("#last_name").on('keyup', function(e) {
                  var val = $(this).val();
                  if (val.match(/[^a-zA-Z]/g)) {
                    $(this).val(val.replace(/[^a-zA-Z]/g, ''));
                  }
          });
          
          $('#submitform').click(function () {
          if (!$('#Check_TermsAndCondidation').prop('checked'))
              {
                  $('#Check_TermsAndCondidation_msg').html('Please check Terms and Conditions');
                  return false;
              }
          });
          
          $('#Check_TermsAndCondidation').change( function(){
              $('#Check_TermsAndCondidation_msg').html('');
          });
      });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The above snippet is validating properly but after editing the first line of above code to :
  <code>&lt;script src="jquery.validate.js"&gt;&lt;/script&gt;</code> , it doesn't work.</p>