In my opinion, you should validate the addresses outside of Acumatica, and then just import them along with the Country field (see what @markusray17 said above….the correct regex for the postal code is going to depend on which Country the address belongs to...so there is no universal formula here that will work for every address type...unless all addresses are from the same country). Otherwise, this is going to be a really long and really complex IIF condition, which is going to possibly introduce bugs.
If we’re talking about Canada postal codes (and assuming there is no space in the postal code), then:
=IIf(( Len([bill-postal-code])=6), ([bill-postal-code]),(""))
I’m not that familiar with this “Excel-like” language used by Acumatica, so other on here can correct me if my formula is a bit off. The intent here is to say that the length of the field must be 6 characters (it would be 7 if there was a space in the middle of the postal code, which is standard for Canadian postal codes). If that is true, we just insert the postal code. If it’s false, we insert nothing… which is what the double quotes at the end are for.