Add commit hook for messages and message validation