title: Form checkValidity() does not mark failed inputs
body: <p>For some reasons, when I use checkValidity() on a form, the failed inputs are not marked as invalid.</p>
  
  <p>The method is called this way :</p>
  
  <pre><code>var result=$("#myForm")[0].checkValidity();
  </code></pre>
  
  <p>When an input is invalid, result is false. But the input is not marked as invalid, there is no visual indication of the error.</p>
  
  <p>I don't know if it is related, but maybe you have to know that the "required" attribute of fields is removed or added dynamically according to user's actions, with code like that :</p>
  
  <pre><code>$('input').prop('required',false);
  $('input').prop('required',true);
  </code></pre>
  
  <p>You also have to know that I use Bootstrap 4, so the failed inputs should get the "is-invalid" class when they fail. Maybe the manipulation of the "required" property confuses Bootstrap ?</p>