# constraint-validation-buggyfill **Repository Path**: mirrors_jaydenseric/constraint-validation-buggyfill ## Basic Information - **Project Name**: constraint-validation-buggyfill - **Description**: Prevents invalid form submission in browsers that improperly support the HTML forms spec (i.e. Safari). - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-09-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # constraint-validation-buggyfill [![npm version](https://badgen.net/npm/v/constraint-validation-buggyfill)](https://npm.im/constraint-validation-buggyfill) [![CI status](https://github.com/jaydenseric/constraint-validation-buggyfill/workflows/CI/badge.svg)](https://github.com/jaydenseric/constraint-validation-buggyfill/actions) 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()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity). ## Setup ### npm setup To install from [npm](https://npmjs.com) run: ```sh npm install constraint-validation-buggyfill ``` Add this import to components with forms: ```js import 'constraint-validation-buggyfill' ``` ### CDN setup To install from [npm](https://npmjs.com) via the [UNPKG CDN](https://unpkg.com), add this script to pages with forms: ```html ``` ## Support - Node.js v10+ - Browsers [`> 0.5%, not dead, IE >= 10, ExplorerMobile >= 10, Firefox >= 4, Chrome >= 10, Safari >= 5, iOS >= 4, Android >= 4, BlackBerry >= 7, KaiOS >= 2.5`](https://browserl.ist/?q=%3E+0.5%25%2C+not+dead%2C+IE+%3E%3D+10%2C+ExplorerMobile+%3E%3D+10%2C+Firefox+%3E%3D+4%2C+Chrome+%3E%3D+10%2C+Safari+%3E%3D+5%2C+iOS+%3E%3D+4%2C+Android+%3E%3D+4%2C+BlackBerry+%3E%3D+7%2C+KaiOS+%3E%3D+2.5) ## See - [Caniuse: Form validation](http://caniuse.com/#feat=form-validation) - [WebKit Bugzilla: Support for interactive validation of form elements](https://bugs.webkit.org/show_bug.cgi?id=28649) - [W3C HTML form submission algorithm](https://www.w3.org/TR/html52/sec-forms.html#form-submission-algorithm) - [WHATWG HTML form submission algorithm](https://html.spec.whatwg.org/multipage/forms.html#form-submission-algorithm)