I am trying to add a validation rule on a multi-select picklist field to avoid any invalid value to be updated on the record. You might be guessing how an invalid value can be selected for a picklist. And the answer is, we can update any kind of junk values on a picklist field using data loader, Apex or API call and the system will let you do that...
So to give an example of what I am trying to achieve, lets say I have a custom mulit-select picklist field 'Color__c' and the available picklist values are "Red", "Blue" and "Green". If any of the above mentioned processes(data loader, Apex or API call ) tries to update the Color__c field with a value other than the above three, it should fail. So a "Red;Yellow", "Blue;White", "Green;Black", "Magenta;Pink" are all invalid entries and should throw a validation error. I have tried all the OR/AND/INCLUDE combinations but may have missed the one that will catch this requirement. Is this achievable through a Validation Rule or I have to do this validation in a Trigger ?
Any help in this regard would be appreciated!
Thanks Tom