validate before publish