[SalesForce] Validation Rule for Changed Value

I'm working on a validation rule that looks at a certain field to see if the Prior Value of that field contains ".com". The requirement is that users should not be able to change a picklist value if the previous value was an email address that ends in ".com".

The validation rule I created is CONTAINS(PRIORVALUE(Origin), '.com') but it doesn't seem to be working.

Any ideas on why this wouldn't catch the ".com" in the picklist value?

Thanks!

Best Answer

If the field is a picklist field you will want to convert it to text first to see if it contains a value:

CONTAINS( TEXT( PRIORVALUE( Origin ) ) , ".com")