#filipsh_addresselement-phone

1 messages ยท Page 1 of 1 (latest)

livid coveBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1271148750487687310

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

hazy flicker
#

filipsh_addresselement-phone

#

@pine dagger looking

hazy flicker
#

okay sorry I'm getting a bit stuck trying to reproduce your issue @pine dagger

#

what exactly isn't working?

#

Ah I think I see what you mean, we ask for the phone number but you can submit without filling it out

pine dagger
#

Is a react code, it looks like this. <LinkAuthenticationElement />
<AddressElement options={addressOptions} />
<PaymentElement options={paymentOptions} /> --> the first element is to the email, the address element is to the shipping info and the last one is the payment data (like card or paypal). The problem is that i need the phone number once finished the payment, but it looks like optional, and the users may not complete it

hazy flicker
#

that's... weird. That seems like a bug to me, let me ask my team

pine dagger
#

okay, thank you so much

livid coveBOT
pine dagger
#

Yhank you so much, the solution is const addressOptions: StripeAddressElementOptions = {
mode: "shipping",
fields: { phone: "always" },
validation: { phone: { required: "always" } },
};

#

๐Ÿ‘

hazy flicker
#

yep just tried and it works. TIL that this feature exists, I had to ask my team, never seen this before

pine dagger
#

jajajajaja, yeah high programming level

#

if in the future i want more info i must open a new ticket right?

hazy flicker
#

only if your thread is already closed. We keep those open for a bit if there's activity. Depends a lot on how busy the server is too

#

so if you have another question it's totally fine to ask and @royal viper will take over