One option would be to use parameterized lookups that can set up dependencies where certain values in one attribute are only available if the criteria is met in the related attribute. See the below related documentation for more details on creating Parameterized Lookups:
Generating a custom error message (including messages based on certain value selections) is unfortunately not available in CA PPM (Project & Portfolio Management) out of the box. The one option would be to create a hint for the field, but this would display all the time, not based on certain criteria.
To add a hint:
- In Administration->Objects->Object name->Views, click on Fields next to the Properties row
- Click on the properties icon next to the Field you want to add the hint to
- Add the desired message in the hint field and Save.