I would like to intercept the expression engine error messages before they are output to the browser. My idea is to store the error message in the session, redirect to the original page (the return to link), grab the message from the session and display it on the original page. This would allow inline error messages.
I’ve got this working easily for freeform using the extension hooks freeform_module_validate_end and freeform_module_form_end (see attached). I would now like to get this to work for member registration, login and profile forms. Unfortunately there are no hooks that I can find that intercept the form processing at the validation and form rendering stages. Also, frustratingly there are no hooks for show_message and show_user_error in the core output class.
Are there any hooks that I’ve missed that might be used for this purpose? If not, is it possible to overload the core classes like you can in CI? Any other ideas?