## Get value from an Address Element

`element.getValue(options?: object)`

Validates and retrieves form values from an Address Element. If there are any input validation errors, the errors will display by their respective fields.

- `options`
  An optional options object to control the format of the returned values.
- `format`
  Controls the format of the `state` field in the returned address value.
  * `latin`: Return the state in Latin characters (for example, "Tokyo").
  * `localized`: Return the state in the locale's native script (for example, "東京").

If unspecified in Stripe.js Clover and below, format is determined by a heuristic based on the customer's browser language. If unspecified in Stripe.js Dahlia and above, defaults to `latin`.

### Example

```javascript
const addressElement = elements.create('address', {
  mode: 'billing',
});
addressElement.mount('#address-element');

// Wait for the element to be ready
addressElement.on('ready', () => {
  const value = addressElement.getValue({format: 'latin'});
  console.log(value);
  // => {
  //   name: 'Jenny Rosen',
  //   address: {
  //     line1: '123 Main Street',
  //     line2: null,
  //     city: 'Anytown',
  //     state: 'CA',
  //     country: 'US',
  //     postal_code: '90210',
  //   },
  // }
});
```