#maha-PaymentElement
1 messages · Page 1 of 1 (latest)
Hi there, you can also register a change event listener for payment element https://stripe.com/docs/js/element/events/on_change?type=paymentElement#element_on_change-event
yes but it's event data doesn't have an error object that I can check
for example, the card element has one: https://stripe.com/docs/js/element/events/on_change?type=cardElement#element_on_change-handler-error
I see, you are right, payment element's change event doesn't have a error object at this moment.
What I want to do here is to place an event handler such that I can account for input validation errors for various different fields for some custom styling purposes (not styling the element)
oh, i see. any other good way to do the above^?
If the purpose is to show different styling when error happens, you can achieve it by using the appearance API https://stripe.com/docs/stripe-js/appearance-api#variables
Ah no, the purpose was to style some other surrounding stuff when an error happens. Already using the appearance API to configure element specific styles
I see
I'm afraid you can't register a listener to get notified when error happens in payment element.
ah I see. unfortunate but thanks