How to trigger HTML5 validation error on button click
- By Preneesh AV --
- 20-Oct-2018 --
- 83 Comments
$("#confirmButton").click (function() {
if (!$("#ajaxForm")[0].checkValidity())
{
$("#ajaxForm")[0].reportValidity();
}
}
$("#confirmButton").click (function() {
if (!$("#ajaxForm")[0].checkValidity())
{
$("#ajaxForm")[0].reportValidity();
}
}