You can use this widget https://appstore.home.mendix.com/link/app/2641/First-Consulting/EnumClass (assuming it still works in 6.7.1) or set booleans based on failed validations which will hide or show different containers with different CSS classes.
Have a look at the Appronto Validator module: https://appstore.home.mendix.com/link/app/35012/
You are able to store validations (error, success, etc) as non persistent objects that you can use to generate a list of the fails/errors.
The Validator module is normally used to display validation feedback (on a form) or a return a list (for webservices) but perhaps you can use it to fit your purpose.