#majks_code

1 messages ยท Page 1 of 1 (latest)

manic plankBOT
#

๐Ÿ‘‹ 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/1268860588294013034

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

novel gustBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

high terrace
#

๐Ÿ‘‹ happy to help

warped minnow
#

hello

high terrace
#

where did you get that code from?

warped minnow
#

newPaymentElement.on('change', (event) => {
console.log(event)
console.log(event.error)
})

#

This one?

high terrace
#

yes

#

the event.error

warped minnow
#

I have written it

high terrace
#

because I don't think the event has an error property

#

oh! this is the cardElement

#

not the paymentElement on change event

warped minnow
#

aaaa oh okay

#

Is there way to get error messages? from paymentElement

#

async checkIfStripeFormValid() {
const { error } = await this.stripeElements.submit()
if (error) {
this.stripeErrorMessage = error.message
return false
}
this.stripeErrorMessage = null
return true
},

high terrace
warped minnow
#

I know this but I do not want to make calls for each time user types field

high terrace
#

you shouldn't handle input validation for paymentElement

warped minnow
#

I just want to copy paymentElement error and show it also in custom element

high terrace
#

unfortunately submitting the element is the only way to get the error in this case

warped minnow
#

Ohh okay thank you

#

That is all thanks

high terrace
#

let me know if you need any more help

manic plankBOT