Return error page if field value is something

What about using a shared controller for all pages and do the magic there?