I have a requirement to create a validation rule on a text field where the values must be capitalized, and restricted to specific values. I realize that converting this field to a picklist is the best course of action, however it cannot be done for the time being, and this is a hacky way of accomplishing the requirement until that change can be made.
The first part of my formula works, which ensures that words must be capitalized, however the second part which is intended to restrict what value a user can enter is not working. I am able to enter any string or number value as long as the string is capitalized.
Here is what I have:
AND(
Tax_1_Code__c <> UPPER(Tax_1_Code__c),
OR(
Tax_1_Code__c <> "HST",
Tax_1_Code__c <> "QST",
Tax_1_Code__c <> "PST",
Tax_1_Code__c <> "RST",
Tax_1_Code__c <> "GST",
Tax_1_Code__c <> "FEDERAL",
Tax_1_Code__c <> "STATE"
)
)
Any help you can give is greatly appreciated.