#Kacper Wilczewski
1 messages · Page 1 of 1 (latest)
hi! no we don't have a standalone Element for just that
ouu :/
Is there a props that I can use to trigger validation for the AddressElement?
can you elaborate on what kind of validation you're referring to?
'm using the AddressElement component in my React application, and I want clicking a button to trigger validation for the fields contained within the AddressElement. By validation, I mean checking if the fields are filled in, if the ZIP code is valid, if a country is selected, and so on.
AFAIK there's not a function, instead you listen to this event https://stripe.com/docs/js/element/events/on_change?type=addressElement#element_on_change-handler-complete and it will change to having complete:true when the input is well-formed
And does Stripe provide an API where I can send form data to validate the following information: tax ID, city, postal code, line, line2, phone?
Hey! Taking over for my colleague. .
And does Stripe provide an API where I can send form data to validate the following information: tax ID, city, postal code, line, line2, phone?
Nope, there is no public API for this
Can we add rules for validating the AddressElement?
You can customize the appearance of the Element but not the validation rules.