Overview:
Offline Validation Rules are not working when using the $UserRole.Name to compare with another field.
Root Cause:
UserRole records are not available on the offline device.
Solution:
Ensure a UserRole VMOC is active for the user.
Note: UserRole.Id functions in offline validation rules without an active UserRole VMOC.
Related Documentation:
CRM Help: Offline Validation Rules