#fxmt-paymentelement-postalcode

1 messages · Page 1 of 1 (latest)

thorny valveBOT
mellow crypt
#

Now when I test postalcode field, it accepts unlimited entries and not restricting the input to 5 digits which the zip code in the us, how can I prevent that from happening?

#

I don't really understand your question. Do you have a demo I can look at?

#

fxmt-paymentelement-postalcode

#

I just tried locally, the PaymentElement will correctly limit the entry to 5 digits for the US

#

The question is when remove the country field from the payment element, the zipcode field doesn't restrict the entry in the zipcode field to five digits as it should be in the us.

#

okay so that's expected in this case since we don't know the country associated with this postal code

wispy rapids
#

Hi, so how can I validate the zipcode and make it limited to 5 digits only

#

or can I limited the options in the country field to the us only?

mellow crypt
#

you can't if you explicitly disable country collection. And no you can't limit the country. It's a payment flow. Cards from any country work