+
+ // Check if the account type is a valid account type, otherwise
+ // display an error message.
+
+ if (ActiveAccountType != "CardDAV" && ActiveAccountType != "carddav" &&
+ ActiveAccountType != "Local" && ActiveAccountType != "local"){
+
+ wxMessageBox(_("Cannot add a new contact as the account type is unsupported."), _("Unsupported account type"), wxICON_ERROR);
+ return;
+
+ }