• Patricia Mozzoni 14
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I keep getting this error even though I have tested and the validation rule does as it should:  Challenge Not yet complete... here's what's wrong:
A validation rule did not prevent a new Account from being saved when Billing Country is blank and Billing State has three characters.

I have separated out billing state and shipping state into 2 validation rules and tested both.  Below is my code for BillingState (ShippingState is same with field name change), can anyone advise what is wrong?  Thanks!
 
AND (
OR(BillingCountry = "US", BillingCountry="USA", ISBLANK(BillingCountry)),
OR(
LEN(BillingState) < 2,
NOT(
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", BillingState)
)))

 
I keep getting this error even though I have tested and the validation rule does as it should:  Challenge Not yet complete... here's what's wrong:
A validation rule did not prevent a new Account from being saved when Billing Country is blank and Billing State has three characters.

I have separated out billing state and shipping state into 2 validation rules and tested both.  Below is my code for BillingState (ShippingState is same with field name change), can anyone advise what is wrong?  Thanks!
 
AND (
OR(BillingCountry = "US", BillingCountry="USA", ISBLANK(BillingCountry)),
OR(
LEN(BillingState) < 2,
NOT(
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", BillingState)
)))