Newer Version Available

This content describes an older version of this product. View Latest

Sample Experience Cloud Site Validation Rules

Available in: both Salesforce Classic and Lightning Experience
Available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, Developer, and Database.com Editions

For more information on any of the formula functions used in these examples, see Formula Operators and Functions by Context.

Preventing Offensive Language in Questions

Field Value
Description: Prevents users from entering offensive language in the Title and Description fields when asking a question.
Formula:
1OR(CONTAINS(Title, 'darn'), CONTAINS(Body, 'darn'))
Error Message: Question title or description contains offensive language.

Preventing Offensive Language in Replies

Field Value
Description: Prevents users from entering offensive language when replying to a question.
Formula:
1OR(CONTAINS(Body, 'darn'), CONTAINS(Body, 'dang'))
Error Message: Reply contains offensive language.

Preventing Offensive Language in Ideas

Field Value
Description: Prevents users from entering offensive language in the Title and Description fields when posting an idea.
Formula:
1OR(CONTAINS(Title, 'darn'), CONTAINS(Body, 'darn'))
Error Message: Idea title or description contains offensive language.

Preventing Offensive Language in Idea Comments

Field Value
Description: Prevents users from entering offensive language when posting a comment.
Formula:
1OR(CONTAINS(CommentBody , 'darn'), CONTAINS(CommentBody, 'dang'))
Error Message: Comment contains offensive language.