rtAdjacentElement("afterend", errorBox);

        field.addEventListener("invalid", () => {
            field.setAttribute("aria-invalid", true);
            const message = getMessage(field);
            errorBox.textContent = message || field.validationMessage;
        })

        field.addEventListener("input", () => {
            const valid = field.checkValidity();
            if (valid) {
                field.setAttribute("aria-invalid", false);
                errorBox.textContent = "";
            