How to create a stripe item zip code that accepts UK zip codes?

I create a payment form with individual Stripe elements:

var stripe = Stripe(...);
var elements = stripe.elements();
...
var postalCode = elements.create('postalCode');
postalCode.mount('#postalCode');

This creates a field that accepts only numbers. However, UK postal codes also contain a letter. How can I let this happen? I want the user to be able to enter almost any possible zip code in the world.

+4
source share
1 answer

As indicated in the comments, the form is dynamically configured based on the map you entered, since the map indicates its country. However, this does not seem to be worth it. I managed to create a valid test order with an invalid UK zip code.

Stripe . .

, (). Visa "ZIP" ( ZIP, ):

Visa (US) Visa Common Card Form

, Stripe test UK Visa, "Postcode" :

British Stripe Test Card Form

+4

Source: https://habr.com/ru/post/1675366/


All Articles