title: Jquery - form validation, add css styles to the error messages
body: <p>I am trying to add css styles to the error messages that show up using Jquery validation. these are under the messages. I'm new to Jquery I have tried adding css class to the error message with no effect.</p>
  
  <hr>
  
  <p>HTML Form</p>
  
  <hr>
  
  <pre><code>&lt;form method="post" action="mail.php" id="contact-form"&gt;
                     &lt;div class="form-group"&gt;
                      &lt;label for="name"&gt;Name&lt;/label&gt;
                      &lt;input type="Text" class="form-control" name="name" id="name" placeholder="Enter Name"&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                      &lt;label for="subject"&gt;Subject&lt;/label&gt;
                      &lt;input type="text" class="form-control" name="subject" id="subject" placeholder="Enter Subject"&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                      &lt;label for="email"&gt;Email address&lt;/label&gt;
                      &lt;input type="email" class="form-control" name="email" id="email" placeholder="Enter Email"&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                      &lt;label for="comment"&gt;Message&lt;/label&gt;
                      &lt;input type="text" class="form-control" name="comment" id="comment" placeholder="Enter Message"&gt;
                    &lt;/div&gt; 
  
                    &lt;button type="submit" value="submit"  name="submit" class="btn btn-default"&gt;Submit&lt;/button&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <hr>
  
  <p>Jquery</p>
  
  <hr>
  
  
  
  
  
  <pre><code>    &lt;script type="text/javascript"&gt;
                   $('#contact-form').submit(function () {
                   $('#loadingimage').show();
                   $('#loadingtext').show();
                  });
      &lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
          (function($,W,D)
          {
              var JQUERY4U = {};
  
              JQUERY4U.UTIL =
              {
                  setupFormValidation: function()
                  {
                      //form validation rules
                      $("#contact-form").validate({
                          rules: {
                              name: "required",
                              subject: "required",
                              email: {
                                  required: true,
                                  email: true
                              },
                              comment: "required"
                          },
                          messages: {
                              name: "Please enter your Name",
                              subject: "Please enter a Subject",
                              email: "Please enter a valid Email Address",
                              comment: "Please enter your Message",
  
                          },
                          submitHandler: function(form) {
                              form.submit();
                          }
                      });
                  }
              }
  
              //when the dom has loaded setup form validation rules
              $(D).ready(function($) {
                  JQUERY4U.UTIL.setupFormValidation();
              });
  
          })(jQuery, window, document);
          &lt;/script&gt;
  </code></pre>