document.addEventListener("DOMContentLoaded", function () { // Hook all Elementor forms document.querySelectorAll("form.elementor-form").forEach(function(form) { form.addEventListener("submit", function (e) { const phoneField = form.querySelector("#form-field-field_2e00034"); if (phoneField) { const value = phoneField.value.trim(); const errorMsg = "Please enter a valid 10-digit mobile number."; // Remove old error if exists let oldError = phoneField.parentNode.querySelector(".phone-error"); if (oldError) oldError.remove(); // Check if invalid if (!/^\d{10}$/.test(value)) { e.preventDefault(); // block form submission phoneField.classList.add("elementor-field-error"); // highlight red border // Create new error message below input let error = document.createElement("div"); error.className = "elementor-message phone-error"; error.style.color = "red"; error.style.fontSize = "14px"; error.style.marginTop = "5px"; error.innerText = errorMsg; phoneField.parentNode.appendChild(error); return false; } else { phoneField.classList.remove("elementor-field-error"); } } }); }); });

Why Is Everyone Obsessed with Iced Matcha Latte?

iced matcha latte

Experience Iced Matcha Latte Like Never Before with Kongsi Tea Bar In today’s cafe culture, few drinks manage to bridge the gap between wellness, authenticity, and modern lifestyle trends as successfully as the iced matcha latte.  This vibrant green beverage is not just an Instagram sensation but a deeply rooted Japanese tradition reimagined for contemporary […]