[SalesForce] Show validation rule error next to the multiple field

The below validation rule works fine but I'm curious to know how can I show the required error message next to the field? As you can see below I have multiple fields and I have selected to show the error on top of the page since I have two fields to validate for ISBLANK is that possible in Validation Rule? or do I have to use VF Page to do that?

AND(ISPICKVAL(Status__c, "Completed")
,
OR(
 ISBLANK(Completion_Date__c),
 ISBLANK(Last_Completion_Date__c) //you can multiple fields just by adding here....   
))

Best Answer

No, you can't have a single Validation Rule attach messages to multiple fields. You would either need to make a separate Validation Rule for each field, or do the validation logic in a simple trigger and apply the messages to each field with record.fieldname.addError(String)

Related Topic