1document.addEventListener("DOMContentLoaded", function() { 2 // ÐÑбиÑаем вÑе ÑоÑÐ¼Ñ Ñ ÐºÐ»Ð°ÑÑом 'form' 3 var forms = document.querySelectorAll('.form'); 4 5 forms.forEach(function(form) { 6 form.addEventListener('submit', function(event) { 7 var isValid = true; 8 9 // ÐÑовеÑка ÑелеÑона (ÑолÑко ÑиÑÑÑ, пÑÐ¾Ð±ÐµÐ»Ñ Ð¸ +) 10 var phoneInput = form.querySelector('input[name="Phone"]'); 11 if (phoneInput) { 12 var phoneValue = phoneInput.value.trim(); 13 if (!/^[\d\s\+]+$/.test(phoneValue)) { 14 alert('ÐÐ¾Ð¼ÐµÑ ÑелеÑона Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ ÑолÑко ÑиÑÑÑ, пÑÐ¾Ð±ÐµÐ»Ñ Ð¸ "+".'); 15 isValid = false; 16 } 17 } 18 19 // ÐÑли валидаÑÐ¸Ñ Ð½Ðµ пÑоÑла, оÑменÑем оÑпÑÐ°Ð²ÐºÑ ÑоÑÐ¼Ñ 20 if (!isValid) { 21 event.preventDefault(); 22 } 23 }); 24 }); 25});
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.