validate before publishing, closes #46