PageSourceSearch

https://www.aviri.immobilien/wp-content/themes/onoffice-pure/share…/js/form/custom-errors.js?ver=1791205019

js aviri.immobilien collected 2026-10-07 05:07:54 UTC 2,616 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".c-form.--custom-validation").forEach(function(l){l.setAttribute("novalidate","");let a=l.querySelectorAll("input, textarea"),o=l.querySelectorAll("select"),r=(e,t)=>{e=e.closest("label, div")?.querySelector(".c-form__error-message");e&&(e.textContent=t,e.classList.add("is-visible"),e.setAttribute("aria-live","polite"))},n=e=>{e=e.closest("label, div")?.querySelector(".c-form__error-message");e&&(e.textContent="",e.classList.remove("is-visible"),e.removeAttribute("aria-live"))},s=t=>{if(t.checkValidity())n(t);else{let e="This field is invalid.";"email"===t.type&&t.validity.typeMismatch?e=window.ooCustomErrorsTranslations.invalidEmail||"Please enter a valid email address.":t.validity.valueMissing?(e=window.ooCustomErrorsTranslations.requiredField||"Please fill in the required field.","checkbox"===t.type&&(e=window.ooCustomErrorsTranslations.requiredCheckbox||"Please accept.")):t.validity.rangeUnderflow&&(e=window.ooCustomErrorsTranslations.numberTooSmall||"Please enter a larger value."),r(t,e)}},c=(a.forEach(function(e){e.addEventListener("blur",function(){s(e)}),e.addEventListener("input",function(){e.checkValidity()&&n(e)})}),e=>{var t=e.nextElementSibling,i=window.ooCustomErrorsTranslations.requiredField||"Please fill in the required field.";e.checkValidity()?(t.classList.remove("is-invalid"),n(e)):(t.classList.add("is-invalid"),r(e,i))}),d=(o.forEach(e=>{e.addEventListener("change",function(){c(e)})}),e=>{var t,e=e.querySelector(":invalid");e&&("SELECT"===e.tagName&&e.nextElementSibling?((t=e.nextElementSibling).setAttribute("tabindex","-1"),t.scrollIntoView({behavior:"smooth",block:"center"}),t):(e.scrollIntoView({behavior:"smooth",block:"center"}),e)).focus({preventScroll:!0})});l.querySelectorAll(".oo-js-paged-next").forEach(e=>{e.addEventListener("click",function(e){var t=Array.from(a).filter(e=>null!==e.offsetParent),i=Array.from(o).filter(e=>null!==e.offsetParent);let r=!0;t.forEach(e=>{e.checkValidity()||(s(e),r=!1)}
1),i.forEach(e=>{e.checkValidity()||(c(e),r=!1)}),r?l.classList.remove("--validated"):(e.preventDefault(),e.stopImmediatePropagation(),l.classList.add("--validated"),d(l))},!0)}),l.querySelectorAll(".oo-js-paged-back").forEach(e=>{e.addEventListener("click",function(){l.classList.remove("--validated")})}),l.querySelectorAll(".c-form__button.oo-js-submit-button").forEach(e=>{e.addEventListener("click",function(e){l.checkValidity()||(e.preventDefault(),e.stopImmediatePropagation(),a.forEach(e=>{s(e)}),o.forEach(e=>{c(e)}),d(l)),l.classList.add("--validated")},!0)})})});

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.