#Abishek-elements-complete
1 messages · Page 1 of 1 (latest)
Hi 👋 you can listen to the events on the element, particularly watching for the complete property to change to true:
https://stripe.com/docs/js/element/events/on_change?type=cardNumberElement
Complete reference documentation for the Stripe JavaScript SDK.
This is only the case when they have focused on the element and I can listen to the events, If someone tries to submit the form without filling any of the card fields, how do I show them an error indicating that the payment form needs to be submitted?
does the stripeElement itself have a key to indicate if the form is valid/complete?
Apologies for the delay, confirming some information.
no problem
Thanks for your patience, we don't have a prebuilt function that checks all elements. You can set a boolean on your page that is updated to true once all the necessary elements have fired a complete=true event, and if your boolean is false when the user clicks on the submit button then you can throw your error.
Here is fine
when confirming the setupIntent, the return_url is mandatory. I assume, the return_url is only required for cases when 3ds validation is required by the card the user is submitting, in other cases what happens on confirming the setupIntent?
Are you using confirmCardSetup?
@terse hornet can you clarify the process you're using for confirming the setup intent?