# 4. Format Phone Numbers

If your customers are located outside of Turkey, it's essential to configure phone number validation and formatting rules appropriately. By default, Akinon systems are configured to validate Turkish mobile numbers. To ensure accurate data collection for international numbers, you must adjust two dynamic settings.<br>

{% stepper %}
{% step %}

### Define the Validation Rule with Regex \[`USER_PHONE_REGEX`]

The `USER_PHONE_REGEX` dynamic setting defines the validation rule for user phone numbers using a regular expression (regex).

**To configure this setting:**

* Go to **Omnitron > Sales Channels > Sales Channel Settings > Dynamic Settings**.
* Locate the `USER_PHONE_REGEX` setting.

By default, this setting is configured for Turkish phone numbers:

```regex
^(05)\d{9}$
```

**Breakdown of the default pattern:**

* `^` — Anchors the match to the beginning of the string
* `(05)` — The number must start with “05”
* `\d{9}` — Followed by exactly 9 digits
* `$` — Anchors the match to the end of the string

This pattern matches exactly 11-digit Turkish mobile numbers (e.g., 05xxxxxxxxx).

If your store serves users in other countries, you should **replace this pattern with a valid regex** for your desired format.

Need help with regex? [Here's a great resource](https://regex101.com/) for building patterns.

Once entered, **click Save** to apply the setting.

<figure><img src="https://164766933-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FszVHHD4skw8SftKawRsw%2Fuploads%2F9jgDF9GUzT72MDyk8bZz%2FScreenshot%202025-04-10%20at%2017.13.21.png?alt=media&#x26;token=f006efa3-6e98-4de4-b26d-3daeb2b0adbc" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Define the Display Format \[`USER_PHONE_FORMAT`]

The `USER_PHONE_FORMAT` dynamic setting controls the **human-readable** format for displaying user phone numbers.

**To configure this setting:**

* Stay in the **Dynamic Settings** section of the same Sales Channel.
* Locate the `USER_PHONE_FORMAT` setting.
* Enter the display format for phone numbers based on your country’s format (e.g., `+44XXXXXXXXXX` or `XXXXXXXXXX`).
* Click **Save** to apply the setting.

<figure><img src="https://164766933-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FszVHHD4skw8SftKawRsw%2Fuploads%2FtYBPyzHlt0puFhOHfm9Q%2FScreenshot%202025-04-10%20at%2017.11.15.png?alt=media&#x26;token=47c139b8-d009-482d-98ca-0539e4d0b15e" alt=""><figcaption></figcaption></figure>

> ⚠️ The format you define in `USER_PHONE_FORMAT` **must be consistent** with the validation rule defined in `USER_PHONE_REGEX`.
>
> If they conflict, warning messages will be shown to users when inputting their phone numbers.
> {% endstep %}
> {% endstepper %}
