> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation and checking services

> Overview of the WEBSALE validation and checking services for user input as well as rule-based checks for payment and shipping methods in the shop.

This page describes the available services for validating user input as well as the rule-based checks for payment and shipping methods.

The services are not classic configuration nodes with their own structure, but are referenced in the respective form or rule definitions (e.g. in account, checkout or payment/shipping configurations).

***

## `addressCheck.*` - Address validations

`addressCheck.*` contains checks for address fields (e.g. name, street, ZIP). The checks are stored in the respective field definitions under `validations`.

The frontend displays the fields as configured and checks during input whether the entries are valid. This detects incorrect or invalid values early.

### `addressCheck.minLength` - Minimum length

Checks the minimum length of the input in address fields.

#### Example configuration for (`accounts.addressField.firstName`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "firstName",
  "validations": [
    {
      "options": {
        "len": 1
      },
      "service": "addressCheck.minLength"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| `len`         | Desired minimum length as a number. |

### `addressCheck.maxLength` - Maximum length

Checks the maximum length of the input in address fields.

#### Example configuration for (`accounts.addressField.firstName`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "firstName",
  "validations": [
    {
      "options": {
        "len": 255
      },
      "service": "addressCheck.maxLength"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| `len`         | Desired maximum length as a number. |

### `addressCheck.numeric` - Digits only

Checks whether the input in address fields consists only of digits.

#### Example configuration for (`accounts.addressField.phone`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "phone",
  "validations": [
    {
      "service": "addressCheck.numeric"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.country` - Country code (ISO)

Checks whether the input or selection in country lists of the address data fields is a country code configured in the shop (ISO code: 2-letter, 3-letter or ISO number).

The official ISO-3166-1 codes (alpha-2, alpha-3 and numeric) can be found on the website of the International Organization for Standardization (ISO): [https://www.iso.org/iso-3166-country-codes.html](https://www.iso.org/iso-3166-country-codes.html)

#### Example configuration for (`accounts.addressField.country`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "country",
  "validations": [
    {
      "service": "addressCheck.country"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.zip` - ZIP / postal code

Checks whether the input is a valid ZIP/postal code for the specified country. The ZIP rules come from the configuration. The associated country must be provided in the `country` field.

#### Example configuration for (`accounts.addressField.zip`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "zip",
  "validations": [
    {
      "service": "addressCheck.zip"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.salutation` - Salutation (code)

Checks whether the input is a valid salutation (code according to configuration).

#### Example configuration for (`accounts.addressField.salutationCode`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "salutationCode",
  "validations": [
    {
      "service": "addressCheck.salutation"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.regex` - Regular expression

Checks whether the input matches a regular expression.

#### Example configuration for (`accounts.addressField.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "additionalInfo",
  "validations": [
    {
      "options": {
        "expression": "^((?i)(?!Postfach).)*$"
      },
      "service": "addressCheck.regex"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| `expression`  | Regular expression (string). |

### `addressCheck.phone` - Phone number

Checks whether the input is a valid phone number. A valid number consists of digits (without length restriction) and optionally an international dialling code.

The `+` in the dialling code is replaced by `00` **after** successful validation.

#### Example configuration for (`accounts.addressField.phone`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "phone",
  "validations": [
    {
      "service": "addressCheck.phone"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.alpha` - Letters only (A–Z)

Checks whether the input consists only of Latin letters (case-insensitive).

#### Example configuration for (`accounts.addressField.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "additionalInfo",
  "validations": [
    { "service": "addressCheck.alpha" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.alphanum` - Letters/digits (A–Z/0–9)

Checks whether the input consists only of Latin letters or digits (case-insensitive).

#### Example configuration for (`accounts.addressField.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "additionalInfo",
  "validations": [
    { "service": "addressCheck.alphanum" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `addressCheck.legalSigns` - Allowed characters

Checks whether all characters in the input are contained in the allowed character set (case-sensitive).

#### Example configuration for (`accounts.addressField.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "additionalInfo",
  "validations": [
    {
      "options": {
        "signs": "123456ABCSDEF"
      },
      "service": "addressCheck.legalSigns"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| `signs`       | Allowed characters (string). |

### `addressCheck.illegalSigns` - Forbidden characters

Opposite of `legalSigns`: the input must not contain any of the specified characters.

#### Example configuration for (`accounts.addressField.phone`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "phone",
  "validations": [
    {
      "options": {
        "signs": "*|~%${};\"<>§@()/-_#"
      },
      "service": "addressCheck.illegalSigns"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                |
| ------------- | ------------------------------ |
| `signs`       | Forbidden characters (string). |

### `addressCheck.date` - Date

Checks whether the input is a valid date and formats the input if needed.

#### Example configuration for (`accounts.addressField.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "additionalInfo",
  "validations": [
    {
      "options": {
        "delimiter": "-",
        "dateformat": "DMY",
        "formatleadingzero": false
      },
      "service": "addressCheck.date"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                                                                                                                          |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `delimiter`         | Separator between day/month/year (e.g. `-` for `15-10-2025`).                                                                                            |
| `dateformat`        | Any combination of `D`, `M`, `Y` (e.g. `DMY` for `15-10-2025`).                                                                                          |
| `formatleadingzero` | If enabled (`true`), days/months are formatted with two digits (`5 → 05`).  <br />If disabled (`false`), leading zeros are removed (`05 → 5`). (Boolean) |

### `addressCheck.allowedSelection` - Selection (list element)

Validates whether the input matches a predefined selection value. For this, the `dataId` of a configuration from `general.addressListElements` is provided.

Typical use: check whether an address is, for example, a "packstation" or "private address".

#### Example configuration for (`accounts.addressField.addressType`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "",
  "name": "addressType",
  "validations": [
    {
      "options": {
        "listElements": "general.addressListElements.addressType"
      },
      "service": "addressCheck.allowedSelection"
    }
  ]
}
```

#### Parameter overview

| **Parameter**  | **Description**                                             |
| -------------- | ----------------------------------------------------------- |
| `listElements` | `dataId` of a definition from `general.addressListElements` |

***

## `dataChecker.*` - General field validations

`dataChecker.*` contains checks for general form fields that are not specific to an address. The checks are included in the respective field definition under `validations`.

The frontend takes the specifications from the field definition and checks during input whether the entry is correct (e.g. length, format or forbidden characters).

### `dataChecker.minLength` - Minimum length

Checks the minimum length of the inputs in form input fields.

#### Example configuration for (`inquiry.form.catalogue.fields.firstName`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Vorname",
  "name": "firstName",
  "required": true,
  "validations": [
    { "options": { "len": 3 }, "service": "dataChecker.minLength" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| `len`         | Desired minimum length as a number. |

### `dataChecker.maxLength` - Maximum length

Checks the maximum length of the inputs in form input fields.

#### Example configuration for (`inquiry.form.catalogue.fields.firstName`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Vorname",
  "name": "firstName",
  "required": true,
  "validations": [
    { "options": { "len": 255 }, "service": "dataChecker.maxLength" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| `len`         | Desired maximum length as a number. |

### `dataChecker.numeric` - Digits only

Checks whether the input in form input fields consists only of digits.

#### Example configuration for (`inquiry.form.catalogue.fields.phone`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Telefon",
  "name": "phone",
  "validations": [
    { "service": "dataChecker.numeric" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `dataChecker.country` - Country code (ISO)

Checks whether the input or selection in country lists of the form fields is a country code configured in the shop (ISO code: 2-letter, 3-letter or ISO number).

The official ISO-3166-1 codes (alpha-2, alpha-3 and numeric) can be found on the website of the International Organization for Standardization (ISO): [https://www.iso.org/iso-3166-country-codes.html](https://www.iso.org/iso-3166-country-codes.html)

#### Example configuration for (`inquiry.form.catalogue.fields.country`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Land",
  "name": "country",
  "validations": [
    { "service": "dataChecker.country" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `dataChecker.zip` - ZIP / postal code

Checks whether the input is a valid ZIP/postal code for the specified country. The ZIP rules come from the configuration. The associated country must be provided in the `country` field.

#### Example configuration for (`inquiry.form.catalogue.fields.zip`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Postleitzahl",
  "name": "zip",
  "validations": [
    { "service": "dataChecker.zip" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| --            | No additional parameters. <br />(For country-specific checks, the `country` field must be available in the context.) |

### `dataChecker.salutation` - Salutation (code)

Checks whether the input is a valid salutation (code according to configuration).

#### Example configuration for (`inquiry.form.catalogue.fields.salutation`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Anrede",
  "name": "salutation",
  "validations": [
    { "service": "dataChecker.salutation" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `dataChecker.regex` - Regular expression

Checks whether the input matches a regular expression.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "validations": [
    {
      "options": {
        "expression": "^((?i)(?!Postfach).)*$"
      },
      "service": "dataChecker.regex"
    }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| `expression`  | Regular expression (string). |

### `dataChecker.email` - Email address

Checks whether the input is a valid email address.

#### Example configuration for (`inquiry.form.catalogue.fields.mail`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "E-Mail-Adresse",
  "name": "mail",
  "validations": [
    { "service": "dataChecker.email" }
  ]
}
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `dataChecker.alphaClass` - Letters (min/different)

Ensures that the input contains **at least** `minChars` Latin letters (case-insensitive); optionally a minimum number of different letters.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "minChars": 8,
        "minDifferentChars": 2
      },
      "service": "dataChecker.alphaClass"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                   |
| ------------------- | ------------------------------------------------- |
| `minChars`          | Minimum number of letters (number ≥ 0).           |
| `minDifferentChars` | Minimum number of different letters (number ≥ 0). |

### `dataChecker.lowerAlphaClass` - Lowercase letters

Like `alphaClass`, but **only** lowercase letters.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "minChars": 8,
        "minDifferentChars": 2
      },
      "service": "dataChecker.lowerAlphaClass"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                             |
| ------------------- | ----------------------------------------------------------- |
| `minChars`          | Minimum number of lowercase letters (number ≥ 0).           |
| `minDifferentChars` | Minimum number of different lowercase letters (number ≥ 0). |

### `dataChecker.upperAlphaClass` - Uppercase letters

Like `alphaClass`, but **only** uppercase letters.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "minChars": 8,
        "minDifferentChars": 2
      },
      "service": "dataChecker.upperAlphaClass"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                             |
| ------------------- | ----------------------------------------------------------- |
| `minChars`          | Minimum number of uppercase letters (number ≥ 0).           |
| `minDifferentChars` | Minimum number of different uppercase letters (number ≥ 0). |

### `dataChecker.digitClass` - Digits

Like `alphaClass`, but for digits.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "minChars": 4,
        "minDifferentChars": 2
      },
      "service": "dataChecker.digitClass"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                  |
| ------------------- | ------------------------------------------------ |
| `minChars`          | Minimum number of digits (number ≥ 0).           |
| `minDifferentChars` | Minimum number of different digits (number ≥ 0). |

### `dataChecker.specialClass` - Special characters

Like `alphaClass`, but for special characters.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "minChars": 2,
        "minDifferentChars": 1
      },
      "service": "dataChecker.specialClass"
    }
  ]
}
```

#### Parameter overview

| **Parameter**       | **Description**                                              |
| ------------------- | ------------------------------------------------------------ |
| `minChars`          | Minimum number of special characters (number ≥ 0).           |
| `minDifferentChars` | Minimum number of different special characters (number ≥ 0). |

### `dataChecker.sequenceOfIdenticalCharacters` - Repeated characters (sequence)

Checks whether the same character occurs too often in a row.

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "caseInsensitive": false,
        "maxSequence": 2
      },
      "service": "dataChecker.sequenceOfIdenticalCharacters"
    }
  ]
}
```

#### Parameter overview

| **Parameter**     | **Description**                                         |
| ----------------- | ------------------------------------------------------- |
| `caseInsensitive` | Ignore case (boolean).                                  |
| `maxSequence`     | Maximum allowed repetition of a character (number ≥ 0). |

### `dataChecker.consecutiveNumbers` - Consecutive numbers

Checks for ascending or descending number sequences (e.g. `12345` or `54321`).

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "maxConsecutive": 2
      },
      "service": "dataChecker.consecutiveNumbers"
    }
  ]
}
```

#### Parameter overview

| **Parameter**    | **Description**                                     |
| ---------------- | --------------------------------------------------- |
| `maxConsecutive` | Maximum length of the number sequence (number ≥ 0). |

### `dataChecker.consecutiveLetters` - Consecutive letters

Checks for ascending or descending letter sequences (e.g. `abcd` or `dcba`).

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "maxConsecutive": 2,
        "caseInsensitive": false
      },
      "service": "dataChecker.consecutiveLetters"
    }
  ]
}
```

#### Parameter overview

| **Parameter**     | **Description**                                     |
| ----------------- | --------------------------------------------------- |
| `maxConsecutive`  | Maximum length of the letter sequence (number ≥ 0). |
| `caseInsensitive` | Ignore case (boolean).                              |

### `dataChecker.palindrome` - Palindrome

Checks whether the input is a palindrome (identical forwards/backwards, e.g. "Otto").

#### Example configuration for (`inquiry.form.catalogue.fields.additionalInfo`)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "label": "Zusatzinformation",
  "name": "additionalInfo",
  "required": true,
  "validations": [
    {
      "options": {
        "caseInsensitive": false
      },
      "service": "dataChecker.palindrome"
    }
  ]
}
```

#### Parameter overview

| **Parameter**     | **Description**        |
| ----------------- | ---------------------- |
| `caseInsensitive` | Ignore case (boolean). |

***

## `paymentValidation.*` - Payment method validation

`paymentValidation.*` contains rules that determine whether a payment method is allowed in the checkout. The check can depend, for example, on the country of the billing or shipping address, the customer type, the basket or the order value.

These rules can be entered in the configuration of the respective payment method under `validations`. The frontend then only shows the payment methods that match, or prevents the selection when the conditions are not met. Here is the link to the corresponding configuration node `payment`: [payment - Payment methods](/en/konfiguration/payment-zahlungsmethoden)

**Evaluation in the frontend**

In the template, the configured rules are evaluated via the method [`$wsCheckout.isValidPayment(paymentId)`](/en/frontend/referenz/module/wscheckout#wscheckout-isvalidpayment): it runs all services stored under `validations` and returns `false` as soon as at least one rule fails. Unavailable payment methods are therefore disabled or hidden in the selection.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{{ foreach $cPayment in $wsConfig.payments }}
  <input type="radio" name="paymentId" value="{{= $cPayment.id }}"
    {{ if not $wsCheckout.isValidPayment($cPayment.id) }} disabled{{ /if }}>
  <label>{{= $cPayment.name }}</label>
{{ /foreach }}
```

For the currently selected payment method, the reasons for a failed check are available under [`$wsCheckout.problems.payment`](/en/frontend/referenz/module/wscheckout#wscheckout-problems-payment); the `check` field names the failed service.

### `paymentValidation.billCountry` - Validation of the country (billing address) for payment methods

Checks whether the country of the billing address is allowed for a payment method according to an "allow/deny" list. Via the options you can define which countries the rule applies to and whether this list allows or forbids countries.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "countryList": [
        "general.country.de",
        "general.country.at",
        "general.country.ch"
      ],
      "rule": "allow"
    },
    "service": "paymentValidation.billCountry"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `countryList` | List of countries to which this rule applies. <br />(ISO country codes, e.g. "`DE`", "`AT`", "`CH`")                                                         |
| `rule`        | Rule control. <br />Possible values:  <br />- `allow` - countries in `countryList` are allowed. <br />- `deny` - countries in `countryList` are not allowed. |

### `paymentValidation.billPhone` - Validation of the phone number

Checks whether a phone number is provided for the billing address (the field must not be empty).

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "service": "paymentValidation.billPhone"
  }
]
```

There are no parameters for this service.

### `paymentValidation.billDateOfBirth` - Validation of the date of birth

Checks whether a date of birth is provided for the billing address (the field must not be empty).

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "service": "paymentValidation.billDateOfBirth"
  }
]
```

There are no parameters for this service.

### `paymentValidation.shippingCountry` - Validation of the country (shipping address)

Checks whether the country of the shipping address is allowed according to an "allow/deny" list. Via the options you can define which countries the rule applies to and whether this list allows or forbids countries.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "countryList": [
        "general.country.gb"
      ],
      "rule": "deny"
    },
    "service": "paymentValidation.shippingCountry"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `countryList` | List of countries to which this rule applies. <br />(ISO country codes, e.g. "`DE`", "`AT`", "`CH`")                                                         |
| `rule`        | Rule control. <br />Possible values: <br /> - `allow` - countries in `countryList` are allowed. <br />- `deny` - countries in `countryList` are not allowed. |

### `paymentValidation.shippingMethod` - Validation of the shipping method for payment methods

Checks whether the selected payment method may only be used with certain shipping methods.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "shippingMethods": [
        "shipping.method.dhl",
        "shipping.method.pickup"
      ],
      "rule": "allow"
    },
    "service": "paymentValidation.shippingMethod"
  }
]
```

#### Parameter overview

| **Parameter**     | **Description**                                                                                                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shippingMethods` | List of shipping method IDs to which this rule applies. <br />The IDs correspond to the internal names of the shipping methods (e.g. `shipping.method.dhl`).                       |
| `rule`            | Rule control. <br />Possible values:  <br />- `allow` - shipping methods in `shippingMethods` are allowed. <br />- `deny` - shipping methods in `shippingMethods` are not allowed. |

### `paymentValidation.accountType` - Validation of the customer type for payment methods

Checks whether the selected payment method may only be used for certain customer types (guest, new customer or existing customer).

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "deny": [
        "guest",
        "newCustomer"
      ]
    },
    "service": "paymentValidation.accountType"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deny`        | List of customer types for which the payment method is blocked.   <br />Possible values:  <br />- "`guest`" - guest buyer <br />- "`newCustomer`" - new customer <br />- "`customer`" - existing customer |

**How the customer type is determined**

* `guest` - the customer orders as a guest (without a user account).
* `newCustomer` - a signed-in customer who fulfils the new-customer rules configured in [`accounts.account.newCustomerRules`](/en/konfiguration/accounts-benutzerkonten#neukunden-regeln-newcustomerrules) at login. A new registration during checkout always results in the type `newCustomer`, regardless of the rules.
* `customer` - any other signed-in customer. If no new-customer rules are configured, signed-in customers are always considered `customer`.

<Info>
  The customer type checked here is not identical to the template variable [`$wsCheckout.accountType`](/en/frontend/referenz/module/wscheckout#wscheckout-accounttype) (`guest` / `new` / `registered`): the latter reports the sign-in method chosen in the checkout, while the validation distinguishes between new and existing customers (`newCustomer` / `customer`). In the order data, `customer` and `newCustomer` are both reported as `registered`.
</Info>

### `paymentValidation.denyDifferingShippingAddress` - Validation of differing shipping addresses for payment methods

Checks whether the billing and shipping addresses are identical.<br />The payment method is only allowed when no differing shipping address is used.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "service": "paymentValidation.denyDifferingShippingAddress"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `paymentValidation.voucherDeny` - Validation of voucher products for payment methods

Checks whether voucher products are in the basket. When voucher products are in the basket, this payment method is not allowed.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "service": "paymentValidation.voucherDeny"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| --            | No additional parameters. |

### `paymentValidation.total` - Validation of minimum / maximum order value for payment methods

Checks whether the payment method may only be used when a certain minimum or maximum order value is reached or not exceeded.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "total": 600,
      "type": "max"
    },
    "service": "paymentValidation.total"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                     |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `total`       | Threshold of the total (goods value) up to or from which the payment method is allowed.                                                                                                                                             |
| `type`        | Check type.   <br />Possible values:  <br />- "`min`" - the payment method is only allowed if the order value is at least `total`. <br />- "`max`" - the payment method is only allowed if the order value does not exceed `total`. |

<Info>
  If both a minimum and a maximum order value are to be checked at the same time, this check must be configured twice with different options.
</Info>

### `paymentValidation.inventoryState` - Validation of the inventory state for payment methods

Checks whether products with a specific stock level are in the basket. If a product in the basket has a status configured in `deny`, the payment method is not allowed.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "deny": [
        "red",
        "yellow"
      ]
    },
    "service": "paymentValidation.inventoryState"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deny`        | List of stock states for which the payment method is forbidden.   <br />Possible values:  <br />- "`red`" - sold out <br />- "`yellow`" - only a few remaining <br />- "`green`" - many available  <br />The thresholds of the individual stock levels are defined in `content.inventory`: [content - Catalog (categories & products)](/en/konfiguration/content-katalog-kategorien-produkte) |

### `paymentValidation.productDependency` - Validation of product dependencies for payment methods

Checks the products in the basket against the configuration [checkout.productDependency](/en/konfiguration/checkout-bestellablauf#checkout-productdependency-produktabhängigkeiten).<br />A payment method is only offered when all referenced product dependencies are fulfilled.

This way you couple a payment method to basket properties without duplicating the check logic. The actual conditions (product fields, free fields, value comparisons) are maintained centrally in [checkout.productDependency](/en/konfiguration/checkout-bestellablauf#checkout-productdependency-produktabhängigkeiten).

#### Example configuration

The "Pay by invoice" option should be blocked as soon as a personalised product (e.g. with an engraving) is in the basket. Because personalised items cannot be returned, they carry a higher payment-default risk. You define the condition "no engraving in the basket" in [checkout.productDependency](/en/konfiguration/checkout-bestellablauf#checkout-productdependency-produktabhängigkeiten) and reference it here afterwards.

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "list": [
        "checkout.productDependency.noEngraving"
      ]
    },
    "service": "paymentValidation.productDependency"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                 |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list`        | List of IDs of configurations from [checkout.productDependency](/en/konfiguration/checkout-bestellablauf#checkout-productdependency-produktabhängigkeiten) to be checked.<br />For the validation to succeed and the payment method to be offered, all values specified here must be fulfilled. |

### `paymentValidation.userAgent` - Validation of the user agent for payment methods

Checks whether a payment method is displayed based on the customer's device or browser. Devices and browsers automatically transmit a technical identifier when a page is called up — the so-called user agent. Based on this identifier, it can be detected, for example, whether someone is using an iPhone, an iPad or a Mac.

The terms entered in `userAgents` are checked against this identifier; a single match is enough. This allows a payment method to be enabled or blocked specifically for certain devices or browsers — for example, when Apple Pay should only be displayed to customers using an Apple device or a compatible browser.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "userAgents": [
        "Macintosh",
        "Mac OS X",
        "iPhone",
        "iPad"
      ],
      "rule": "allow"
    },
    "service": "paymentValidation.userAgent"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                 |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `userAgents`  | List of terms searched in the customer's device/browser identifier. <br />One match is enough. <br />The values are not predefined by WEBSALE, but correspond to the actual strings that the respective device or browser transmits. <br />The correct values must be determined on the respective device itself, e.g. via the browser console. |
| `rule`        | Rule control.      <br />Possible values:  <br />- `allow` - payment method is only displayed when at least one term from `userAgents` is detected. <br />- `deny` - payment method is hidden when a match is found.                                                                                                                            |

***

## `shippingMethodValidation.*` - Shipping method validation

`shippingMethodValidation.*` contains rules that determine whether a shipping method is allowed in the checkout. The check can depend, for example, on the shipping country, the goods value, product types or the selected payment method.

These rules can be entered in the configuration of the respective shipping method under `validations`. The frontend then only offers the shipping methods that match the current conditions.

**Evaluation in the frontend**

In the template, the configured rules are evaluated via the method [`$wsCheckout.isValidShippingMethod(shippingMethodId)`](/en/frontend/referenz/module/wscheckout#wscheckout-isvalidshippingmethod) (same pattern as for payment methods). The reasons for a disabled shipping method can additionally be output via [`$wsCheckout.getShippingMethodDisabledErrors(shippingMethodId)`](/en/frontend/referenz/module/wscheckout#wscheckout-getshippingmethoddisablederrors).

### `shippingMethodValidation.shippingCountry` - Validation of the country (shipping address)

Checks whether the country of the shipping address is allowed according to an "allow/deny" list. Via the options you can define which countries the rule applies to and whether this list allows or forbids countries.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "countryList": [
        "general.country.de",
        "general.country.at"
      ],
      "rule": "allow"
    },
    "service": "shippingMethodValidation.shippingCountry"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `countryList` | List of countries to which this rule applies. <br />(ISO country codes, e.g. "`DE`", "`AT`", "`CH`")                                                         |
| `rule`        | Rule control. <br />Possible values:  <br />- `allow` - countries in `countryList` are allowed. <br />- `deny` - countries in `countryList` are not allowed. |

### `shippingMethodValidation.paymentMethod` - Validation of the payment method for shipping methods

Checks whether a shipping method may only be used with certain payment methods.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "paymentMethods": [
        "payment.method.invoice",
        "payment.method.prepayment"
      ],
      "rule": "allow"
    },
    "service": "shippingMethodValidation.paymentMethod"
  }
]
```

#### Parameter overview

| **Parameter**    | **Description**                                                                                                                                                                |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `paymentMethods` | List of payment method IDs to which this rule applies. <br />The IDs correspond to the internal names of the payment methods (e.g. `payment.method.invoice`)                   |
| `rule`           | Rule control. <br />Possible values:  <br />- `allow` - payment methods in `paymentMethods` are allowed. <br />- `deny` - payment methods in `paymentMethods` are not allowed. |

### `shippingMethodValidation.valueOfGoods` - Validation of the minimum/maximum order value for shipping methods

Checks whether the shipping method may only be used when a certain minimum or maximum order value is reached or not exceeded.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "valueOfGoods": 100,
      "type": "min"
    },
    "service": "shippingMethodValidation.valueOfGoods"
  }
]
```

#### Parameter overview

| **Parameter**  | **Description**                                                                                                                                                                                                                                     |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `valueOfGoods` | Threshold of the total (goods value) up to or from which the shipping method is allowed.                                                                                                                                                            |
| `type`         | Check type.   <br />Possible values:  <br />- "`min`" - the shipping method is only allowed if the order value is at least `valueOfGoods`. <br />- "`max`" - the shipping method is only allowed if the order value does not exceed `valueOfGoods`. |

### `shippingMethodValidation.productType` - Validation of the product type for shipping methods

Checks whether all products in the basket have a matching product type.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "rule": "allow",
      "ruleList": [
        "productType.digital"
      ],
      "includeList": [
        "productType.service"
      ]
    },
    "service": "shippingMethodValidation.productType"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `rule`        | Check type.   <br />Possible values: <br />- "`allow`" - only product types from `ruleList` and `includeList` are allowed. <br />- "`deny`" - product types from `ruleList` are not allowed. Exception: product types from `includeList` are always allowed. |
| `ruleList`    | List of product types that — depending on `rule` — are allowed or not allowed.                                                                                                                                                                               |
| `includeList` | List of product types that are always allowed.                                                                                                                                                                                                               |

### `shippingMethodValidation.productDependency` - Validation of product dependencies for shipping methods

Checks the products in the basket against the configuration [checkout.productDependency](/en/konfiguration/checkout-bestellablauf#checkout-productdependency-produktabhängigkeiten).

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "list": [
        "checkout.productDependency.digitalOnly",
        "checkout.productDependency.noBulkyGoods"
      ]
    },
    "service": "shippingMethodValidation.productDependency"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                  |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list`        | List of IDs of configurations from `checkout.productDependency` to be checked. <br />For the validation to succeed, all values specified here must be fulfilled. |

### `shippingMethodValidation.expressCheckout` - Validation of the express checkout for shipping methods

Checks whether a shipping method is allowed depending on the payment method used in the express checkout. The check applies to PayPal Express as well as Apple Pay and Google Pay Express (PayPal Commerce Platform).

#### Example configuration

The shipping method should not be selectable if the customer runs the ordering process as a PayPal Express Checkout:

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"validations": [
  {
    "options": {
      "rule": "deny",
      "ruleList": [
        "paypalCheckout"
      ]
    },
    "service": "shippingMethodValidation.expressCheckout"
  }
]
```

#### Parameter overview

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rule`        | Check type.   <br />Possible values:  <br />- "`deny`" - if the ordering process runs as an express checkout with a payment method from `ruleList`, the shipping method is blocked. Outside the express checkout, the shipping method is allowed. <br />- "`allow`" - the shipping method is **only** allowed if the ordering process runs as an express checkout with a payment method from `ruleList`. In the normal checkout (no express checkout active), the shipping method is therefore always blocked — `allow` thus defines a pure express-checkout shipping method. |
| `ruleList`    | List of payment method IDs that — depending on `rule` — are allowed or forbidden in the express checkout. <br />The IDs correspond to the identifiers of the payment methods from [payment.payment](/en/konfiguration/payment-zahlungsmethoden) (e.g. `paypalCheckout`).                                                                                                                                                                                                                                                                                                      |

If the check fails, the validation returns the error `expressCheckoutDenied` or `expressCheckoutNotAllowed`; in the frontend it can be output via [`$wsCheckout.getShippingMethodDisabledErrors()`](/en/frontend/referenz/module/wscheckout#wscheckout-getshippingmethoddisablederrors).
