default validation error message if any field is invalid
                nameInput.reportValidity();
                emailInput.reportValidity();
                phoneInput.reportValidity();
                bioInput.reportValidity();
                return;  // Stop function execution if invalid
            }


            if (newEmail && !validateEmail(newEmail)) {
                alert("Invalid email address");
                return;
            }
            if (selectedAvatar) {
                localSt