Hi I have a validation rule that works but another requirement came up where it needs to trigger for certain record types.
I've tried to add an extra AND before the validation rule to exclude a certain record type but it doesn't seem to work and doesn't trigger at all.
OR(
AND(
RecordTypeId <> "012200000005KeL",
AND( NOT(REGEX(ShippingPostalCode, "\\d{3}")),
1 = CASE( ShippingCountryCode,
'FO', 1 ,
'IS' , 1 ,
'LS' , 1 ,
0 )),
AND(
NOT(REGEX(ShippingPostalCode, "^([0-9]{3}-[0-9]{4})?$|^[0-9]{7}+$")),
1 = CASE( ShippingCountryCode,
'JP', 1 ,
0 )),
AND(
NOT(REGEX(ShippingPostalCode, "^([0-9]{2}-[0-9]{3})?$|^[0-9]{5}+$")),
1 = CASE( ShippingCountryCode,
'PL', 1 ,
0 )),
AND(
NOT(REGEX(ShippingPostalCode, "^([0-9]{3} [0-9]{2})?$|^[0-9]{5}+$")),
1 = CASE( ShippingCountryCode,
'SE', 1 ,
'CZ', 1 ,
'SK', 1 ,
0 ))))