How to force a html5 form validation without submitting it via jQuery
var $myForm = $('#myForm')
if (!$myForm[0].checkValidity()) {
// If the form is invalid, submit it. The form won't actually submit;
// this will just cause the browser to display the native HTML5 error messages.
$myForm.find(':submit').click()
}
Tu opinión es importante para mi, ¿Te ha resultado útil este artículo?