I just came across a salesforce documentation to check the limitation of validation rules – https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_validation_considerations.htm&language=th
It says:
Validation Rule Field Restrictions:
Validation rule formulas don’t or can’t refer to:
Compound fields, including addresses, first and last names, and dependent picklists and lookups
Campaign statistic fields, including statistics for individual campaigns and campaign hierarchies
Merge fields for auto-number or compound address fields such as Mailing Address
I tried to refer the lookup field in the validation rule of an object and I was able to validate whether the lookup is blank or not and show an error if the lookup field is blank. I don't understand what it means by
Validation rule formulas don’t or can’t refer to Compound fields,
including addresses, first and last names, and dependent picklists and
lookups
from the documentation link.
Best Answer
You can use it for some formulas such as isblank.
See https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/compound_fields_limitations.htm
Seems a disconnect in the documentation