diff options
| author | XhmikosR <[email protected]> | 2021-08-04 18:41:51 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-04 18:41:51 +0300 |
| commit | f20fece3a8cdd0e76a42c2737524b7652bf54d26 (patch) | |
| tree | 83e62cc954b17a8bc21cd5975bfd88da721793d1 /site/content/docs/5.0/examples/checkout/form-validation.js | |
| parent | 7fcc2f4d526ff774a0a7de6b624a607e5ba47fb9 (diff) | |
| download | bootstrap-5.1.0.tar.xz bootstrap-5.1.0.zip | |
Prepare v5.1.0. (#34674)v5.1.0
Diffstat (limited to 'site/content/docs/5.0/examples/checkout/form-validation.js')
| -rw-r--r-- | site/content/docs/5.0/examples/checkout/form-validation.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/site/content/docs/5.0/examples/checkout/form-validation.js b/site/content/docs/5.0/examples/checkout/form-validation.js deleted file mode 100644 index f8fd583de..000000000 --- a/site/content/docs/5.0/examples/checkout/form-validation.js +++ /dev/null @@ -1,20 +0,0 @@ -// Example starter JavaScript for disabling form submissions if there are invalid fields -(function () { - 'use strict' - - // Fetch all the forms we want to apply custom Bootstrap validation styles to - var forms = document.querySelectorAll('.needs-validation') - - // Loop over them and prevent submission - Array.prototype.slice.call(forms) - .forEach(function (form) { - form.addEventListener('submit', function (event) { - if (!form.checkValidity()) { - event.preventDefault() - event.stopPropagation() - } - - form.classList.add('was-validated') - }, false) - }) -})() |
