It was somewhat of a pain, but to do this we had to modify the templates to inherit from our custom base class (which inherited from EntityBase2). From what I remember this amounted to going through each template and replacing each EntityBase2 with CustomEntityBase. This lead to problems upgrading templates, so much in fact that we rarely do it except for bug fixes which affect our application directly.
Had I to do it again, one possible way would have been to create a BrokenRulesManager and use it like:
BrokenRulesManager.Instance.GetBrokenRules(entity)
Another possible way is to write GetBrokenRules into the user defined part of the Entity template, but this seems like a bit too much of a hack to me as this code would be repeated in every single entity.