<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Validation Rule formulas: Part 1</title>
	<atom:link href="http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/feed/" rel="self" type="application/rss+xml" />
	<link>http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/</link>
	<description>The hows and whys of Salesforce.com</description>
	<pubDate>Tue, 06 Jan 2009 04:29:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Seth Klugman</title>
		<link>http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/comment-page-1/#comment-39092</link>
		<dc:creator>Seth Klugman</dc:creator>
		<pubDate>Wed, 10 Dec 2008 17:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/#comment-39092</guid>
		<description>In what language are these validation rules written? 

I would like to start developing my own rules...

sklugman@phreesia.com

Thanks!</description>
		<content:encoded><![CDATA[<p>In what language are these validation rules written? </p>
<p>I would like to start developing my own rules&#8230;</p>
<p><a href="mailto:sklugman@phreesia.com">sklugman@phreesia.com</a></p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vardan Petrosian</title>
		<link>http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/comment-page-1/#comment-11044</link>
		<dc:creator>Vardan Petrosian</dc:creator>
		<pubDate>Tue, 29 Jan 2008 23:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/#comment-11044</guid>
		<description>I would like to know if there is a formula for making sure that the data is selected from the dropdown list and not typed randomly.

Please reply onto my email address:

v_petrosian@hotmail.com

Vardan Petrosian</description>
		<content:encoded><![CDATA[<p>I would like to know if there is a formula for making sure that the data is selected from the dropdown list and not typed randomly.</p>
<p>Please reply onto my email address:</p>
<p><a href="mailto:v_petrosian@hotmail.com">v_petrosian@hotmail.com</a></p>
<p>Vardan Petrosian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Parks</title>
		<link>http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/comment-page-1/#comment-6538</link>
		<dc:creator>Brad Parks</dc:creator>
		<pubDate>Mon, 26 Nov 2007 15:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/#comment-6538</guid>
		<description>The following rule ensures that the country field is supplied as "US" for the United State, "Canada" for Canada, and anything else for any other country.




OR
(

OR(Country="CAN", Country="CANADA", Country="CA", Country="CAD", Country="STATES", Country="The States", Country = "States", Country="CDN", Country = "USA", Country="UNITED", Country="UNITED STATES", Country="USA", Country="U.S.A.", Country="US A.", Country="U S A.", Country="U.S.A."),

AND(LEN(Country) </description>
		<content:encoded><![CDATA[<p>The following rule ensures that the country field is supplied as &#8220;US&#8221; for the United State, &#8220;Canada&#8221; for Canada, and anything else for any other country.</p>
<p>OR<br />
(</p>
<p>OR(Country=&#8221;CAN&#8221;, Country=&#8221;CANADA&#8221;, Country=&#8221;CA&#8221;, Country=&#8221;CAD&#8221;, Country=&#8221;STATES&#8221;, Country=&#8221;The States&#8221;, Country = &#8220;States&#8221;, Country=&#8221;CDN&#8221;, Country = &#8220;USA&#8221;, Country=&#8221;UNITED&#8221;, Country=&#8221;UNITED STATES&#8221;, Country=&#8221;USA&#8221;, Country=&#8221;U.S.A.&#8221;, Country=&#8221;US A.&#8221;, Country=&#8221;U S A.&#8221;, Country=&#8221;U.S.A.&#8221;),</p>
<p>AND(LEN(Country)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Parks</title>
		<link>http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/comment-page-1/#comment-6537</link>
		<dc:creator>Brad Parks</dc:creator>
		<pubDate>Mon, 26 Nov 2007 15:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://salesforce.phollaio.com/2007/01/08/validation_rule_formulas/#comment-6537</guid>
		<description>The following "State" validation rule will ensure that if a user has selected a country of either "Canada" or "US", and they supply a state/province, that it is a 2 letter code for the state/province.

IF(AND(LEN(State) &#62; 0, OR(Country="Canada", Country="US")),

NOT(
  AND(
    LEN(State) = 2, 
    OR(
      IF(AND(Country="Canada", CONTAINS("AB:BC:MB:NB:NL:NT:NS:NU:ON:PC:QC:SK:YT", State)), TRUE, FALSE),
      IF(AND(Country="US", CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:WA:WV:WI:WY", State)), TRUE, FALSE)
    )
   )
),


FALSE)</description>
		<content:encoded><![CDATA[<p>The following &#8220;State&#8221; validation rule will ensure that if a user has selected a country of either &#8220;Canada&#8221; or &#8220;US&#8221;, and they supply a state/province, that it is a 2 letter code for the state/province.</p>
<p>IF(AND(LEN(State) &gt; 0, OR(Country=&#8221;Canada&#8221;, Country=&#8221;US&#8221;)),</p>
<p>NOT(<br />
  AND(<br />
    LEN(State) = 2,<br />
    OR(<br />
      IF(AND(Country=&#8221;Canada&#8221;, CONTAINS(&#8221;AB:BC:MB:NB:NL:NT:NS:NU:ON:PC:QC:SK:YT&#8221;, State)), TRUE, FALSE),<br />
      IF(AND(Country=&#8221;US&#8221;, CONTAINS(&#8221;AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:WA:WV:WI:WY&#8221;, State)), TRUE, FALSE)<br />
    )<br />
   )<br />
),</p>
<p>FALSE)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
