Shipping_Zip_Code

Print
Validation rule Details
Name Shipping_Zip_Code
Label Shipping_Zip_Code
Object Account
Active No
Formula
AND(
 OR(ShippingCountry = "USA", ISBLANK(ShippingCountry)),
  OR(
   AND(LEN(ShippingPostalCode) <>5, 
      LEN(ShippingPostalCode) <> 10),
   NOT(CONTAINS("0123456789", 
      LEFT( ShippingPostalCode, 1))),
   NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 2, 1))),
   NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 3, 1))),
   NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 4, 1))),
   NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 5, 1))),
   AND(
    LEN(ShippingPostalCode) = 10,
   OR(
    MID( ShippingPostalCode , 6, 1) <> "-",
    NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 7, 1))),
    NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 8, 1))),
    NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 9, 1))),
    NOT(CONTAINS("0123456789", 
      MID( ShippingPostalCode , 10, 1)))
   )
  )
 )
)
Error message
Error location