>()[\]\.,;:\s@\"]{2,})$/i;
if (!regex.test(email.value))
return alert(email.getAttribute("data-validation")), !1;
}
if (null != phone && 7 > phone.value.length)
return alert(phone.getAttribute("data-validation")), !1;
if (null != custom && 0 == custom.value.length)
return alert(custom.getAttribute("data-validation")), !1;
if (null != consent && false === consent.checked)
return alert(consent.getAttribute("data-validation")), !1;
setTimeout(function () {
el.reset();
}, 50);
return true;
}
function soSubmitModal(el) {
const modalWrapper = document.createElement("div");
const button = el.querySelector('input[name="button"]');
let html = "
<
style type=\"text/css\">\n" +
" @media (max-width:500px) { #so-widget-modal-content { width:100% !important; height:100% !important; margin-top:50px !important; } }\n" +
" @media (max-width:500px) and (max-height:550px) { #so-widget-modal-content { height:100% !important;} }\n" +
" @media (min-height:601px) and (max-height:750px) and (min-width:501px) { #so-widget-modal-content { margin-top:100px !important; } }\n" +
" @media (max-height:600px) and (min-width:501px) { #so-widget-modal-content { margin-top:80px !important; } }\n" +
" #iframe-wrapper {width: 100%;height: 100%;-webkit-overflow-scrolling: touch !important}\n" +
" #iframe-wrapper iframe {height: 100%;width: 100%;}\n" +
"
> \n" +
"
<div id=\"iframe-wrapper\">\n" +
"\t\t\t\t
<iframe name=\"so-iframe\" id=\"so-iframe\" scrolling=\"yes\" style=\"border:1px solid transparent; width:100%; height:100%; box-sizing:border-box;\">
>\n" +
"\t\t\t
