2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Bump version to 5.0.0-alpha1 (#29925)

Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
This commit is contained in:
XhmikosR
2020-05-13 22:36:00 +03:00
committed by GitHub
parent de7af5ee07
commit 38ec7c4df7
288 changed files with 237 additions and 230 deletions
@@ -0,0 +1,20 @@
// 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)
})
})()