function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dschultzdschultz 

need help with a simple validation rule

We have a custom required text field called "Locale" for leads.  In addition to being required, I want to validate that it is set to either "US" or "CA" during edit/create.  Any ideas?  Pseudo code looks like this:

if the locale equals US or CA
    allow update/insert
otherwise
    display error message

Nathan CrosbyNathan Crosby
The validation rule will look something like this and should work just fine. It will return TRUE if neither US or CA is selected

NOT(OR(Locale__c = 'US', Locale__c = 'CA'))
dschultzdschultz
Worked perfectly - thanks very much!