#Kasuni

1 messages · Page 1 of 1 (latest)

fallen socketBOT
mild basalt
#

Hi! Let me help you with this.

west forge
#

Thanks

mild basalt
#

Are you using the Card Element? Or Payment Element?

west forge
#

I am using Payment element

mild basalt
west forge
#

i tried it but think i cannot use change event because i use it inside checkbox click event .

#

After using getelement is there anyway to validate the element?

mild basalt
#

I don't think it's possible.

#

But you can listen to the event outside of the click handler, and store the current state in a variable. Then read the variable inside the click handler.

zenith solstice
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

west forge
#

how to get the state of payment element?

zenith solstice
#

would you mind sharing your code snippet please?

west forge
#

sure

#

this is my checkbox click event

#

inside it i wanna get the stripe form validate status

zenith solstice
fallen socketBOT
west forge
#

Hi After check input was complete or not, is there way to display errors in stripe elements?

stone cliff
#

it does that automatically as in-built functionality as far as I know.

west forge
#

is ther any way to call this manually?

#

in my case i wanna show errors before it goes to confirmpayment. This validations automatically showing only when i call to confirmpayment event

stone cliff
#

well it shows them if the user for example clicks to the next input automatically

stone cliff
stone cliff
west forge
stone cliff
#

well you can show you own message somewhere on your page to tell the customer the payment form is not complete

west forge
#

yes it is possible .that means we cannnot show default stripe form errors in situation liike this?

stone cliff
#

correct

west forge
stone cliff
#

no that's not possible, it's for the entire element