const formData=document.getElementById("formData"),link=document.getElementById("link"),messageError1=document.getElementById("messageError1"),sendButton=document.getElementById("buttonSendData"),div1=document.getElementById("div1");let validationLogin=!1;formData.addEventListener("submit",s=>{!0===div1.classList.contains("success")&&(validationLogin=!0),!1===validationLogin&&s.preventDefault()}),sendButton.addEventListener("click",()=>{let s=link.value.trim();0===s.length?(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message")):s.length>=6?(div1.classList.add("success"),link.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):s.length<6&&(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message"))}),link.addEventListener("input",function(){let s=link.value.trim();0===s.length?(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message")):s.length>=6?(div1.classList.add("success"),link.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):s.length<6&&(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message"))}),link.addEventListener("blur",function(){let s=link.value.trim();0===s.length?(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message")):s.length>=6?(div1.classList.add("success"),link.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):s.length<6&&(div1.classList.remove("success"),link.classList.add("error-input"),messageError1.classList.add("show-error-message"))});