#Meet M
1 messages · Page 1 of 1 (latest)
You'd likely want to listen for the change event and toggle disabled status depending on the complete field: https://stripe.com/docs/js/element/events/on_change?type=paymentElement#element_on_change-event
I am use this in react not js element
https://stripe.com/docs/stripe-js/react
Then use the onChange prop on your <PaymentElement /> component: https://stripe.com/docs/stripe-js/react#element-components
hi
in the above link, I check it's working fine but after I fill all values the button is enable then after I change the value of the Expiration date to past years that means stripe throw error it that condition I want to disable button if there is any error on stripe
first image when CVC is not enter
2nd enter CVC button is enable now
I want disable button on this as well
so I can archive this .?
I don't believe so, no. There's no way to check validity status of the Element via the events
that will be fired when all the inputs have values at least. I would play around with that event and see if it meets yours needs
I believe that's what they're already doing as per what I advised