Domains are awesome. They allow to manage data integrity in a very straightforward way.
Actually the framework is able to show a descriptive validation error message for simpler domains. Otherwise a generic message is shown.
Indeed with the generic error the user rarely knows what is wrong. From deployer side is also difficult to determine it when either the domain is very complex or it has got many clauses or it’s extended in several modules.
Add a new optional parameter “domain_help” in fields in order to define human readable text for each condition. It would be a list and the elements should be in same order than clauses in domain.
The error message will show the text of the invalid condition or all domain help if defined (I’m afraid domain is validated as a whole).