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

Validation rule on single quote

I am trying to create a validation rule so that the firstname field in the contact record can not be saved if a quote(') character is entered.  Salesforce should prompt the user that the record can not be saved.

I have used both the "contains" function but I can not seem to get this to work.  What am i doing wrong? 

For example, these 3 examples should error out:

3. '
CONTAINS( "'", firstname )

Message Edited by bikla78 on 01-14-2008 04:25 PM

Message Edited by bikla78 on 01-14-2008 10:12 PM
You have provided wrong inputs to CONTAINS...
It should be vice versa...CONTAINS( firstname,"'" )
Please read 'Help on this function' document. Link is given under functions that can be used in a validation rule.