@stripe Elements needs a way to focus the "inputs" from the DOM in a standard-ish way that can be made to work with most of the dom based form validation libraries.
You can use the `change` event to check for errors in the element: https://stripe.com/docs/js/element/input_validation …
-
-
I already have validation working. The problem is getting the first invalid input to focus, when libraries that do that typically work with normal form inputs.
-
Since Elements is inside an iFrame, that wouldn’t work out-of-the-box—you would need to listen for validation and then call element.focus() manually. Feel free to share more details with us at https://support.stripe.com/contact and we can take a closer look!
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.