Prevents invalid form submission in browsers that improperly support the HTML forms spec (i.e. Safari).
Prevents invalid form submission in browsers that improperly support the HTML forms spec (e.g. Safari v5 → 10). The first invalid element is focused after alerting the validation message. An alert is used due to poor browser support for reportValidity()
.
To install from npm run:
npm install constraint-validation-buggyfill
Add this import to components with forms:
import 'constraint-validation-buggyfill'
To install from npm via the UNPKG CDN, add this script to pages with forms:
<script src="https://unpkg.com/constraint-validation-buggyfill"></script>
> 0.5%, not dead, IE >= 10, ExplorerMobile >= 10, Firefox >= 4, Chrome >= 10, Safari >= 5, iOS >= 4, Android >= 4, BlackBerry >= 7, KaiOS >= 2.5