#sh3ft

1 messages · Page 1 of 1 (latest)

flat bearBOT
humble quail
#

Stripe Element doesn't have any control over you forms

#

What you can do is when you click on the confirm/pay button

#

you validate your form

#

and then you call stripe.confirmPayment

lucid scroll
#

Is there a way to add a listener to the field that I want so I can see if it's a valid field or an empty field?

humble quail
#

You want to add a listener where exactly?

lucid scroll
#

On card number field, card expiry field and on the card cvc field

humble quail
lucid scroll
#

is the apove link you share compatible with this PaymentElements?

import { PaymentElement, useElements, useStripe } from '@stripe/react-stripe-js'

humble quail
lucid scroll
#

I get the following error if I try that:
Property 'on' does not exist on type 'PaymentElementComponent'.

humble quail
#

That's a react Component right ?

lucid scroll
#

Yeah

humble quail
#

The guide I shared with you is for Javscript integration

lucid scroll
#

Do we have a react example? apologies I should have mentioned it from the start

humble quail
lucid scroll
#

Yeah I think that will do the trick thanks 🙂