diff options
| author | Bobby <[email protected]> | 2024-08-16 20:47:33 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-16 20:47:33 -0400 |
| commit | 6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch) | |
| tree | 8343c27b8b95ff5639233e81cf157f92e5688466 /site/content/docs/5.1/examples/checkout/form-validation.js | |
| parent | d53094ec16ba385faae2973ddee648698b32ab24 (diff) | |
| parent | 048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff) | |
| download | bootstrap-main.tar.xz bootstrap-main.zip | |
Diffstat (limited to 'site/content/docs/5.1/examples/checkout/form-validation.js')
| -rw-r--r-- | site/content/docs/5.1/examples/checkout/form-validation.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/site/content/docs/5.1/examples/checkout/form-validation.js b/site/content/docs/5.1/examples/checkout/form-validation.js deleted file mode 100644 index f8fd583de..000000000 --- a/site/content/docs/5.1/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) - }) -})() |
