This provides a better fallback, especially for browsers that implement the spec correctly and don't let the field's value be in an invalid state. See my comment at #20.
I also added the polyfill for other element types than <input> (namely <select>, <textarea> and <button>) as the Constraint Validation API is available for all these tags according to MDN. Note: I also don't know why one should want to validate a button...
This provides a better fallback, especially for browsers that implement the spec correctly and don't let the field's value be in an invalid state. See my comment at #20.
I also added the polyfill for other element types than
<input>
(namely<select>
,<textarea>
and<button>
) as the Constraint Validation API is available for all these tags according to MDN. Note: I also don't know why one should want to validate a button...Closes #20 and #19.