Notifications: validation of TemplateMessage added

- when creating or updating TemplateMessage, the message is now being
  validated for syntax before stored in database