1// Example starter JavaScript for disabling form submissions if there are invalid fields // 2(function() { 3 'use strict'; 4 window.addEventListener('load', function() { 5 // Fetch all the forms we want to apply custom Bootstrap validation styles to 6 var forms = document.getElementsByClassName('needs-validation'); 7 // Loop over them and prevent submission 8 var validation = Array.prototype.filter.call(forms, function(form) { 9 form.addEventListener('submit', function(event) { 10 if (form.checkValidity() === false) { 11 event.preventDefault(); 12 event.stopPropagation(); 13 } 14 form.classList.add('was-validated'); 15 }, false); 16 }); 17 }, false); 18})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.