 <p>The <strong>HTMLFormElement</strong> object/type has an <strong>checkValidity</strong> method you can use to check that.</p> <p>Check it here: <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement</a></p>