categories
Residential
Community Living, Harmonious Homes
Lifestyle
Well Being Oasis, Vibrant Living
Outdoor
Nature's Haven, Community Outdoor
Education
Re-imagining Tomorrow's Leaders
Commercial District
Thriving Commerce, Sustainable Growth
System Contributors
In Touch with Tomorrow
System Operators
Smart Living, Sustainable Future
Invest wisely
CMC Token
company
About
Building a community, shaping the future.
FAQs
Your questions answered & simplified
Events
celebrating innovation
Shareholders
Investing in our vision, growing together.
Career
Join our team, shape the future
SMME Database
connecting opportunities
50 SMMEs
Suporting local businesses
GALLERY
capturing innovation,
celebrating community
reserve your spot
Expression of Interest
token
contact
Expression of interest
cmc token
career
Events
faq
reserve now
Tomorrow's Villages Re-Imagined
Residential
Community Living, Harmonious Homes
learn more
Tomorrow's Villages Re-Imagined
Lifestyle
Well Being Oasis, Vibrant Living
learn more
Tomorrow's Villages Re-Imagined
Outdoor
Nature's Haven, Community Outdoor
learn more
Tomorrow's Villages Re-Imagined
Education
Re-imagining Tomorrow's Leaders
learn more
Tomorrow's Villages Re-Imagined
Commercial District
Thriving Commerce, Sustainable Growth
learn more
Tomorrow's Villages Re-Imagined
System Contributors
In Touch with Tomorrow
learn more
Tomorrow's Villages Re-Imagined
System Operators
Smart Living, Sustainable Future
learn more
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(); } } });