title: ASP.NET Web Forms - Client side validation not working when field populated via jquery?
body: <p>I have the following ASP.Net WebForm where the <code>Address</code> field is a required field. The <code>Address</code> field is populated via jQuery with the value of the <code>Location</code> field. </p>
  
  <p>When I click submit without filling in any fields, the client side validation fires and we get the error message displayed below the <code>Address</code> control. </p>
  
  <p>If I now enter a value into the <code>Location</code> field, the jQuery fires and the <code>Address</code> field is populated with a value but the previous error message doesn't clear - It only clears when I manually enter a value?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;label&gt;Location&lt;/label&gt;
      &lt;asp:TextBox ID="Location" runat="server" CssClass="form-control" ClientIDMode="Static" placeholder="Enter location"&gt;&lt;/asp:TextBox&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;label &gt;Address&lt;/label&gt;
      &lt;asp:TextBox ID="Address" runat="server" CssClass="form-control" ClientIDMode="Static" placeholder="Enter the address"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Address is Required" Display="Dynamic" ControlToValidate="Address" CssClass="field-validation-error" EnableClientScript="True"&gt;&lt;/asp:RequiredFieldValidator&gt;
  &lt;/div&gt;
  &lt;asp:Button ID="Submit" runat="server" Text="Save" OnClick="btnSubmit_Click" CssClass="btn btn-primary" /&gt;  
  
  &lt;script&gt;
      $("#Location").on('change', function (e) {
          var location =  $("#Location").val();
          $("#Address").val(location);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>How can I fix this so that if a client side error is displayed below a control, that it clears the error message if the validation logic is fullfilled via jquery as in the example above?</p>