validate when creating new post