Added an error message for invalid community names

fixes #908.