+ Start a Discussion

Validation rule using if condition

How to write Validation rule using if condition can any one help

Steve MolisSteve Molis

Can you post a specific example of what you are trying to do with the VR? 

If you're just looking for infomation on the usage of an IF function there are some resources available here->



Below is the sample code of Validation Rules using IF condition -


            IF(MOD(TestNumber__c ,10) != 0, true, false)


            It basically checks if TestNumber__c field is not in multiple of 10 i.e. it will be true for the values :

            0, 10, 20, 30, 40, 50, 60, 70,80, 90, 100

Hi Pradeep

I am also trying the same validation rule like above ..but it is not working for "Percent" field. Any work around on this??

Thanks in Advance
Madhu N 31Madhu N 31
if syntax