onError handler not firing
Closed this issue · 1 comments
mrfelton commented
The onError
handler doesn't seem to be firing.
<input {...getCardNumberProps({ onError: () => console.log('SOME ERROR') })} />
This never logs. Other handlers do work.
When is it supposed to fire? I would expect it to run if I type something invalid into the box.
mrfelton commented
This issue is that I was trying to set this at the field leve rather than as config to the hook itself. The following does work:
usePaymentInputs({ onError: handleOnError })