Add directives and models to allow displaying error messages more easily.