Form element reportValidity() ponyfill example

Links: GitHub | NPM | Twitter

This ponyfill recreates the formElement.reportValidity() function in non-supporting browsers, and uses the native function if available.

View reportValidity on MDN

Browser support for reportValidity is mainly lacking in IE11: https://www.caniuse.com/#feat=constraint-validation

Test form

Actions

Use this button to report form validity using reportValidity(), but not submit the form:

Output: false

Use this button to submit the form using a normal submit action: