title: html5 validation error message without submitting form
body: <p>I am developing an app in which I am using HTML5 fields in my form. I want to trigger html5 field validation on button click for this purpose I have written this code</p>
  
  <pre><code> &lt;input type="button" id="btnContactSubmit" class="btn btn-success" value="Submit"&gt;
  
    $('#btnContactSubmit').click(function (e) {
  
              if ($('#aspnetForm')[0].checkValidity()) {
                  e.preventDefault();
                  if (flag) {
                      createListItem();
                  }
              } else {
                   e.preventDefault();
  
              }
          });
  </code></pre>
  
  <p>button click is working fine but it doesnot showing error message on relevant field I want to show error message without submitting my form.</p>