> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/users/llms.txt)
> Source: https://docs.saleor.io/api-reference/users/queries/address-validation-rules

# addressValidationRules Query

Returns address validation rules.

```graphql
addressValidationRules(
  countryCode: CountryCode!
  countryArea: String
  city: String
  cityArea: String
): AddressValidationData
```

Details

```graphql
type AddressValidationData {
  countryCode: String!
  countryName: String!
  addressFormat: String!
  addressLatinFormat: String!
  allowedFields: [String!]!
  requiredFields: [String!]!
  upperFields: [String!]!
  countryAreaType: String!
  countryAreaChoices: [ChoiceValue!]!
  cityType: String!
  cityChoices: [ChoiceValue!]!
  cityAreaType: String!
  cityAreaChoices: [ChoiceValue!]!
  postalCodeType: String!
  postalCodeMatchers: [String!]!
  postalCodeExamples: [String!]!
  postalCodePrefix: String!
}
```

<a id="arguments"></a>

### Arguments

<a id="country-code"></a>

#### [`countryCode`](#country-code) ● [`CountryCode!`](/api-reference/miscellaneous/enums/country-code.md)

Two-letter ISO 3166-1 country code.

<a id="country-area"></a>

#### [`countryArea`](#country-area) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Designation of a region, province or state.

<a id="city"></a>

#### [`city`](#city) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

City or a town name.

<a id="city-area"></a>

#### [`cityArea`](#city-area) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Sublocality like a district.

<a id="type"></a>

### Type

<a id="addressvalidationdata"></a>

#### [`AddressValidationData`](/api-reference/users/objects/address-validation-data.md)

Represents address validation rules for a country.
