How to use HTML form.checkValidity()?
For Me this works in jQuery
$('#formSection')[0].checkValidity();
checkValidity()
is a HTML5 method and
When the checkValidity() method is invoked, if the element is a candidate for constraint validation and does not satisfy its constraints, the user agent must fire a simple event named invalid that is cancelable (but in this case has no default action) at the element and return false. Otherwise, it must only return true without doing anything else.
Please learn more about how to use form validation constraints here. There are number of useful methods you can use, customize and even build custom validation methods.
You also can find basic explanation and examples in w3schools. Hope this helps.
just use a required
Example
<input type"text" id="id" required>
if you press the submit button there an alert text saying PLEASE FILL OUT THIS FIELD