#stefan_elements-feedback
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1278011329218613392
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
What kind of validation, exactly?
That validation already happens on blur without any submission though
so what exactly are you trying to do or expecting?
yes, i get that.
I have this form
when i click on Review order
i want CVC to show the error
without submiting the element
notice how CVC is empty
because the user wants to review the order
So you can set up a listener on change to see when the elements fields are complete: https://docs.stripe.com/js/element/events/on_change?type=paymentElement#element_on_change-handler-complete
i did that, but that wont trigger the error messages
When you say submitting the element, are you referring to elements.submit() or stripe.confirmPayment()?
elements.submit()
Does submit() surface these for you?
yes
And what is the issue with using that?
Well, my PMs want to NOT show the rest of the payment dialogs (Google wallet/Apple pay) once the user clicks Review order and submit does that.
So if i put a submit here, then the dialogs and validations work - but my PMs don't want the dialogs here. If I omit the submit, i loose the validation messages.
Right, so that's not currently exposed then. I would say you should refer to the complete property in the change event and direct your user to complete incomplete fields.
We're looking at revisions to this event, so what would you expect to have there to make this easier? A list of incomplete fields? The specific validation failures? SOmething else?
paymentElement.validate()
that triggers the validation without submission
Tell Dont Ask.
That would be awesome to have on all the elements
cause i had same issue with the address element
I will share that feedback internally ๐
For now, that's not something that is supported