def postal_code=(code)
      if code.presence.kind_of?(String)
        if country_code == 'CA'
          code = code.upcase.gsub(/[^A-Z0-9]/, '')
          code = code.insert(3, ' ') if code.length == 6
        elsif country_code == 'US'
          code = code.gsub(/[^0-9]/, '')
        end
      end

      super(code)
    end
def postal_code=(code)
      if code.presence.kind_of?(String)
        if country_code == 'CA'
          code = code.upcase.gsub(/[^A-Z0-9]/, '')
          code = code.insert(3, ' ') if code.length == 6
        elsif country_code == 'US'
          code = code.gsub(/[^0-9]/, '')
        end
      end

      super(code)
    end
If the country is Canada or US, enforce the correct postal code/zip code format