4. Format Phone Numbers
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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:
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? for building patterns.
Once entered, click Save to apply the setting.
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.
⚠️ The format you define in
USER_PHONE_FORMAT
must be consistent with the validation rule defined inUSER_PHONE_REGEX
.If they conflict, warning messages will be shown to users when inputting their phone numbers.