I am working on a validation rule where I does not want a field (Web Form) to be equal to the below mentioned 2 email IDs. It's giving me a syntax error. Can anyone please suggest on the below please :

Web_Form_Source__c <> "goldrush.oliverhume.com.au", "builders.oliverhume.com.au"),
GSR_Referral_Date_Time__c == null
  • YEs, it's a validation rule basically the requiment is eaither of these URLs should be in the address field.
    – Ata Ali
    Apr 1, 2016 at 3:46

2 Answers 2


(a) The OR should be an AND. When using <> (not equals), if it's equal to one value, it will not be equal to the other-- therefore it will always return true, so it would always be wrong.

(b) The validation rule should return true when it should error, not when it should pass.

(c) You have to compare against a field every time, so you can't just use a simple comma (,).

(d) You can use CASE to reduce field references.

So, you might write your formula as this:

    "goldrush.oliverhume.com.au", 1,
    "builders.oliverhume.com.au", 1,
    0) = 1


Web_Form_Source__c = "goldrush.oliverhume.com.au" || Web_Form_Source__c = "builders.oliverhume.com.au"

If it's a validation rule and you don't want to allow these 2 email addresses, then the validation rule needs to evaluate to true.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .