title: jquery validator: when to clear custom error icon
body: <p>I am using jQuery Validator to validate user input. I am trying to figure out when should i clear the custom error icon displayed next to the invalid element. The code posted below keeps appending the error icon. I tried to clear it in <code>showErrors</code> event, but no luck.</p>
  
  <pre><code> $("#form1").validate({
                  onfocusout: false,
                  onKeyUp: false,
  
                  rules: {
  
                   txtDate:{
                      required: true
                   },
                   txtType:{                   
                        required: true
                   },
                   ddlTime:{                   
                        required: true
                   }
                 },
                 messages: {
                  ddlTime: {                   
                        required: "Please select an option for Time"
                   },
                   txtDate:{
                      required: "&lt;br&gt;Please enter valid date"
                   },
                   txtType: {                   
                        required: "&lt;br&gt;Please Enter valid type"
                   }
                 },
                 errorPlacement: function(error, element) {
                      error.wrap("&lt;li&gt;&lt;/li&gt;").appendTo($("#dvErrorSummary")); 
                      $('&lt;div class="errorIcon"&gt;&lt;/div&gt;').insertAfter(element);
                    }
               }); 
  </code></pre>
  
  <p>This is how my css looks like:</p>
  
  <pre><code>label.error {
      color: red;
      font-style: italic
  }
  
      .errors { color: red; }
      .errorIcon 
      { 
          background: url(../errorIcon.png); 
          width: 16px; 
          height: 16px;
          display:inline;
  
      }
  </code></pre>
  
  <p>This is how my HTML Looks Like:</p>
  
  <pre><code>&lt;body&gt;
  &lt;html&gt;
  &lt;head runat="server"&gt;&lt;/head&gt;
  
          &lt;form id="form1" runat="server"&gt;
  
              &lt;ul id="dvErrorSummary" name="dvErrorSummary" class="errors"&gt;&lt;/ul&gt;
  
               &lt;select id="ddlTime" name="ddlTime" &lt;/select&gt;
               &lt;input id="txtDate" name="txtDate" /&gt;
               &lt;input id="txtType" name="txtType" /&gt;
  
         &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>