aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.1/examples/checkout/form-validation.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-16 20:47:33 -0400
committerGitHub <[email protected]>2024-08-16 20:47:33 -0400
commit6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch)
tree8343c27b8b95ff5639233e81cf157f92e5688466 /site/content/docs/5.1/examples/checkout/form-validation.js
parentd53094ec16ba385faae2973ddee648698b32ab24 (diff)
parent048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff)
downloadbootstrap-main.tar.xz
bootstrap-main.zip
Merge branch 'twbs:main' into mainHEADmain
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.js20
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)
- })
-})()