title: MVC3 jquery.validate.unobtrusive override options without editing source?
body: <p>just wondering if there is a way to override the highlight and unhighlight options when using mvc3 jquery.validate.unobtrusive without editing the source js file...</p>
  
  <p>I already tried:</p>
  
  <pre><code>var elementToValidate = $(element);
          var form = $(element.form);
          if (form.length) {
              //elementToValidate.valid();
              form.validate({
                  highlight: function (element, errorClass, validClass) {
                      $(element).removeClass(errorClass);
                      $(element).closest('td').addClass('alert-error error');
                  }, unhighlight: function (element, errorClass, validClass) {
                      $(element).removeClass(errorClass);
                      $(element).closest('td').addClass('alert-error error');
                  }
              });
          }
  </code></pre>
  
  <p>but highlight and unhighlight aren't overridden unless i remove the unobtrusive library from my scripts..</p>
  
  <p>If i edit the source of jquery.validate.unobtrusive.js It seems to work just perfectly:</p>
  
  <pre><code>function validationInfo(form) {
          var $form = $(form),
              result = $form.data(data_validation);
  
          if (!result) {
              result = {
                  options: {  // options structure passed to jQuery Validate's validate() method
                      errorClass: "input-validation-error",
                      errorElement: "span",
                      errorPlacement: $.proxy(onError, form),
                      invalidHandler: $.proxy(onErrors, form),
                      messages: {},
                      rules: {},
                      success: $.proxy(onSuccess, form),
                      highlight: function (element, errorClass, validClass) {
                          $(element).removeClass(errorClass);
                          $(element).closest('td').addClass('alert-error error');
                      }, unhighlight: function (element, errorClass, validClass) {
                          $(element).removeClass(errorClass);
                          $(element).closest('td').addClass('alert-error error');
                      }
                  },
                  attachValidation: function () {
                      $form.validate(this.options);
                  },
                  validate: function () {  // a validation function that is called by unobtrusive Ajax
                      $form.validate();
                      return $form.valid();
                  }
              };
              $form.data(data_validation, result);
          }
  
          return result;
      }
  </code></pre>
  
  <p>just wondering if anyone has come up with a way to override the options without having to modify the source..</p>
  
  <p>Cheers</p>