Speaktech.in

How to trigger HTML5 validation error on button click

 $("#confirmButton").click (function() {

     if (!$("#ajaxForm")[0].checkValidity())

     {

       $("#ajaxForm")[0].reportValidity();

     }

}