#arkansasbeauty_89186
1 messages · Page 1 of 1 (latest)
Hi there
Hello
You should be able to use cardNumber.update() (https://stripe.com/docs/js/element/other_methods/update?type=cardNumber#element_update-options-style) to update the style in this way on a submit error if you so desire.
Hmm actually not sure you can manipulate the border with that style object
Double checking
Yeah doesn't look like it. So instead you would need to modify your div that you are using to render CardNumberElement in order to apply a border
Oh, I was just trying to implement your original suggestion with no luck and just saw your current comment.
Yep sorry, I had forgotten there is no border attribute for that style
So only way is to create a wrapper and apply conditional styling that way?
For a border, yes.
Otherwise Id have to utilize the payment-element that has it built in correct?
Correct
You can modify the border with the Appearance API: https://stripe.com/docs/elements/appearance-api
I will take a look, thank you!