I am using the following for my regular expression check.
(^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]?\d[ABCEGHJKLMNPRSTVWXYZ]\d$)|(^\d{5}(-\d{4})?$)
This permits Canadian Postal Codes without the space and American Postal Codes.
- If a purchaser enters an invalid postal code (ie: X1X 1X1) which is supposed to be Canada Post's format but doesn't work with the Canada Post plugin, then they receive a custom error message, however they are STILL PERMITTED to continue with the purchase which indicates Free Canada Post shipping.
It looks like I need a way to prevent the user from entering the incorrect Postal Code format at the time they are entering it, or somehow convert it to the correct format.