+ Start a Discussion
Patricia Mozzoni 14Patricia Mozzoni 14 

superbadge process automation specialist step 2

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)
)))

 
AbhishekAbhishek (Salesforce Developers) 
Hi,

Please note that Questions about how to pass Trailhead challenges are not on topic, because these challenges are intended to be independent demonstrations of your abilities.

Trailhead Help (https://trailhead.salesforce.com/en/help?support=home)can provide assistance for situations where Trailhead does not appear to be functioning correctly. You can reach out to them if this is the case.


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Regards,
​​​​​​​Salesforce Support.
Patricia Mozzoni 14Patricia Mozzoni 14
Thank you.