Form element reportValidity() ponyfill example
This ponyfill recreates the formElement.reportValidity() function in non-supporting browsers, and uses the native function if available.
Browser support for reportValidity is mainly lacking in IE11: https://www.caniuse.com/#feat=constraint-validation