connecting community, celebrating innovation.

events

previous events

CMC Events are designed to foster community interaction and promote innovation. Featuring workshops, networking opportunities, and sustainability-focused activities, these events create a platform for residents to learn, collaborate, and grow. They also highlight the village’s commitment to eco-friendly practices and cutting-edge technology, supporting local businesses and fostering a vibrant community atmosphere.

24
'
24
'
Molepo Dam, Ga Molepo
Molepo Dam, Ga Molepo

Family, Cookout, & Fun Day

23
'
23
'
Polokwane Golf Club
Polokwane Golf Club

Inaugural Golf Day Celebration Event

23
'
23
'
Molepo Dam, Ga Molepo
Molepo Dam, Ga Molepo

Site Invitation

23
'
'
Molepo Dam, Ga Molepo
Molepo Dam, Ga Molepo

Sod-Turning

document.addEventListener("DOMContentLoaded", function () { const forms = document.querySelectorAll("form"); forms.forEach(form => { form.addEventListener("submit", function (event) { let isValid = true; const requiredFields = form.querySelectorAll("[required]"); requiredFields.forEach(field => { if (!field.value.trim()) { isValid = false; field.classList.add("error"); addErrorMessage(field, "This field is required."); } else if (field.name === "contactNumber") { // Adjust to your contact field name const contactPattern = /^\+?\d{7,15}$/; // Accepts 7-15 digits, with optional + for country code const cleanedValue = field.value.replace(/\D/g, ""); // Remove non-numeric characters if (!contactPattern.test(cleanedValue)) { isValid = false; field.classList.add("error"); addErrorMessage(field, "Enter a valid contact number (7-15 digits, optional country code)."); } else { clearErrorMessage(field); } } else { clearErrorMessage(field); } }); if (!isValid) { event.preventDefault(); alert("Please complete all required fields correctly."); } }); }); function addErrorMessage(field, message) { clearErrorMessage(field); const errorMessage = document.createElement("span"); errorMessage.textContent = message; errorMessage.classList.add("error-message"); field.insertAdjacentElement("afterend", errorMessage); } function clearErrorMessage(field) { field.classList.remove("error"); if (field.nextElementSibling?.classList.contains("error-message")) { field.nextElementSibling.remove(); } } });