Cambodia Phone Number Validation: Complete +855 Format Guide
Master Cambodia phone number validation with regex patterns, E.164 formatting, operator prefixes, and code examples. Includes TRC-verified mobile codes and compliance requirements.
This guide provides comprehensive coverage of Cambodia phone number validation, equipping you with the knowledge and tools to integrate accurate phone number handling into your applications. You'll learn E.164 formatting standards, regex validation patterns, Cambodian mobile operator prefixes, area codes, best practices for data storage, and regulatory compliance requirements for the +855 country code.
Why Validate Cambodia Phone Numbers?
Correctly handling Cambodian phone numbers is crucial for several reasons:
Reliable Communication: Accurate validation ensures your system connects with users reliably, preventing failed messages and calls.
Data Integrity: Validated phone numbers contribute to a cleaner, more reliable database, improving data quality for analytics and other purposes.
Regulatory Compliance: Adhering to Cambodian telecommunications regulations set by the Ministry of Posts and Telecommunications (MPTC) and the Telecommunication Regulator of Cambodia (TRC) is essential for operating legally and ethically.
Enhanced User Experience: Validating phone numbers upfront prevents errors and streamlines the user journey.
Cambodia Phone Number Format and Structure
Cambodia's phone numbers adhere to the ITU-T E.164 international phone number format standard (E.164 11/10, effective November 2010). This standard defines a general format for international telephone numbers, ensuring global interoperability. The E.164 format limits phone numbers to a maximum of 15 digits, with the structure: [+][country code][area/operator code][subscriber number].
Cambodia Country Code: +855
Country Code: +855. This code uniquely identifies Cambodia in international calls. Prepend this to the number when dialing from outside Cambodia.
International Access Codes: Cambodia uses international access codes starting with 00, where the third digit identifies the operator's gateway. Currently active codes include:
001 – Gateway 1 (MPTC/Telecom Cambodia)
007 – Gateway 2 (Royal Telecam International)
008 – VoIP Gateway
These prefixes select a specific international gateway operator when making calls from within Cambodia. If your application handles calls originating from within Cambodia, consider offering users the option to select their preferred gateway.
National Prefix: 0
National Prefix: 0. This prefix is used for domestic calls within Cambodia. Remove this prefix when converting a number to international format.
Cambodia Phone Number Formats by Type
Cambodian phone numbers fall into several categories: geographic (landline), mobile, and special service numbers.
Geographic Numbers (Landlines with Area Codes)
Geographic numbers are tied to specific regions within Cambodia. They follow this structure:
Code
0[2-7]X XXXX XX(X)
Where the first two digits after the 0 represent the area code. Geographic numbers have 6 or 7 subscriber digits after the area code.
Cambodia Area Codes by Region:
02X prefix: Phnom Penh (023), Kandal (024), Kampong Speu (025), Kampong Chhnang (026)
Mobile numbers vary by operator and follow this general format:
Code
0TT XXX XXX(X)
Mobile numbers have 8 or 9 digits total (including the leading 0). The first two digits after the 0 identify the mobile operator. Most operators use 8-digit numbers (7 subscriber digits), but some use 9-digit numbers (8 subscriber digits).
Current Cambodia Mobile Operator Prefixes (verified via TRC Mobile Prefixes, accessed January 2025):
Note: Prefixes marked with * indicate 7-digit subscriber numbers (10 digits total including 0). All other prefixes use 6-digit subscriber numbers (9 digits total including 0).
Important: Operator prefixes may change as new allocations are made. Verify current prefixes with the TRC (trc.gov.kh/en/resources/mobile-prefixes/) for the most up-to-date information.
These include toll-free (1800 XXXX) and premium-rate (1900 XXXX) numbers. These numbers have specific uses and billing structures, so identify them correctly in your validation logic.
How to Validate Cambodia Phone Numbers Using Regex
Regular expressions (regex) provide a powerful way to validate Cambodia phone number formats. Here are production-ready patterns based on TRC specifications.
JavaScript Regex Validation Examples
JavaScript
// Geographic Number Validation (6 or 7 digits after area code)const geoPattern = /^0[2-7]\d{7,8}$/;
console.log(geoPattern.test('0231234567')); // true (7 digits)console.log(geoPattern.test('023123456')); // true (6 digits)// Mobile Number Validation (8 or 9 digits total including leading 0)const mobilePattern = /^0(1[0-8]|3[18]|6[0-179]|7[0-18]|8[0-8]|9[0-38])\d{6,7}$/;
console.log(mobilePattern.test('012345678')); // true (8 digits)console.log(mobilePattern.test('0762345678')); // true (9 digits)// International Format Validation (with +855 country code)const internationalPattern = /^\+855[1-9]\d{7,8}$/;
console.log(internationalPattern.test('+85512345678')); // true
Important: These regex patterns are based on current TRC allocations. Test your regex thoroughly with a variety of valid and invalid numbers. Some operators use longer subscriber numbers or have specific digit patterns.
Complete Phone Number Validation Function
A robust validation function should handle various scenarios, including cleaning the input and providing informative error messages.
Converting Cambodia Numbers to E.164 International Format
For international calls or data storage, convert numbers to E.164 international format by removing the national prefix (0) and prepending the country code (+855).
Store Cambodian phone numbers in your database using a VARCHAR field with a length of 15 characters to accommodate the E.164 international format and any potential extensions. Consider storing the phone number type (mobile, geographic, etc.) to facilitate filtering and analysis. Implement encryption for stored numbers to comply with data privacy regulations. For additional verification needs, consider integrating a phone lookup service to validate number ownership and carrier information.
Provide clear and user-friendly error messages when validation fails. Guide users on how to correct their input. For example, if a user enters an invalid operator prefix, display a message like "Invalid operator prefix. Check your number and try again."
Cambodia Phone Number Regulations and Data Privacy Compliance
Current Regulatory Status (as of January 2025):
Cambodia has not yet enacted comprehensive data protection legislation. The Ministry of Posts and Telecommunications (MPTC) released a draft Law on Personal Data Protection (LPDP) for consultation on July 25, 2023, but it has not progressed to enactment. The draft law's scope is limited to the private sector and does not apply to public authorities.
Current Legal Framework:
Data protection currently falls under the right to privacy, protected broadly under:
Constitution of the Kingdom of Cambodia (2010)
Civil Code of the Kingdom of Cambodia (2007)
Criminal Code of the Kingdom of Cambodia (2009)
Banking Law and other sector-specific regulations
Key Regulatory Bodies:
MPTC: Ministry of Posts and Telecommunications (mptc.gov.kh)
TRC: Telecommunication Regulator of Cambodia (trc.gov.kh)
Best Practice Requirements:
Until comprehensive data protection legislation is enacted, follow these best practices:
Obtain explicit user consent for phone number collection
Implement encryption for stored phone numbers
Maintain secure data handling practices
Provide users with data access and deletion rights
Keep records of consent and data processing activities
Monitor for updates to the draft LPDP and prepare for compliance once enacted
Advanced Implementation Tips
Network Detection and Routing: Use the operator prefix to determine the network and apply carrier-specific routing rules. This optimizes call routing and improves call quality.
Operator Updates: Operator prefixes and number formats can change. Stay updated with the latest information from the TRC at trc.gov.kh/en/resources/mobile-prefixes/ to ensure your validation logic remains accurate. Check the TRC website quarterly for updates.
Number Portability: Be aware that mobile number portability may allow users to keep their numbers when switching operators. The prefix may not always accurately reflect the current operator.
Frequently Asked Questions (FAQ)
What is the country code for Cambodia?
The country code for Cambodia is +855. When dialing from outside Cambodia, dial +855 followed by the area code (without the leading 0) and the subscriber number. For example, to call a Phnom Penh landline (023 123 4567) from the United States, dial: 011 (US exit code) + 855 (Cambodia) + 23 1234567.
How do I format a Cambodia phone number in E.164 format?
To format a Cambodia phone number in E.164 format, remove the leading 0 from the domestic number and prepend +855. For example, 012 345 678 becomes +85512345678. The E.164 format contains no spaces or special characters.
What are the main mobile operators in Cambodia?
The main mobile operators in Cambodia are Cellcard, Smart, Metfone, qb, Seatel, and CooTel. Each operator has specific prefix allocations that can be verified on the TRC website.
How many digits are in a Cambodia mobile phone number?
Cambodia mobile phone numbers contain 8 or 9 digits total, including the leading 0. This equals 7 or 8 subscriber digits after the operator prefix. Most operators use 8-digit numbers, but some prefixes (like 076, 096) use 9 digits.
How do I validate a Cambodia phone number in JavaScript?
Use regex patterns to validate Cambodia phone numbers:
Cambodia's national prefix is 0. It's used for domestic calls within Cambodia but must be removed when converting to international format.
Where can I verify Cambodia mobile operator prefixes?
Official Cambodia mobile operator prefixes are published by the Telecommunication Regulator of Cambodia (TRC) at trc.gov.kh/en/resources/mobile-prefixes/. The list is updated as new allocations are made. Always verify against the TRC's official list for the most current and accurate prefix allocations.
Are there data privacy requirements for storing Cambodia phone numbers?
While Cambodia has not yet enacted comprehensive data protection legislation as of January 2025, you should still follow best practices: obtain explicit user consent, implement encryption, maintain secure data handling, and provide data access and deletion rights to users. Treat phone numbers as personally identifiable information (PII) and implement appropriate security measures.
Summary
By following these guidelines, you ensure accurate and reliable Cambodia phone number handling in your applications, enhancing user experience and maintaining regulatory compliance. Remember to validate numbers using TRC-verified operator prefixes, convert to E.164 format for storage, and stay updated on regulatory changes from MPTC and TRC.
Frequently asked questions
Validate Cambodian phone numbers using regular expressions (regex) tailored to specific number formats like geographic (0[2-4]\d{7,8}) and mobile (0[1-9]\d{7,8}). These regex patterns help verify number structure but may need adjustments for specific operator prefixes or edge cases, so thorough testing is crucial for accuracy and reliable validation in your application logic.
The country code for Cambodia is +855. This code, based on the ITU-T E.164 international standard, must be prepended to the phone number when dialing from outside Cambodia, ensuring proper routing and connectivity to the Cambodian telephone network. It distinguishes Cambodian numbers from other countries globally.
Accurate phone number validation in Cambodia ensures reliable communication by preventing failed messages and calls, improves data integrity for analytics and other purposes, and helps maintain regulatory compliance with MPTC guidelines, which is crucial for operating legally and ethically. Additionally, accurate validation contributes to a smoother user experience.
Cambodian mobile numbers generally follow the format 0[1-9]X XXXX XXX(X), being either 8 or 9 digits long excluding the leading 0. The first two digits after the 0 identify the mobile operator (e.g., 012 for Cellcard, 010 for Smart), which can be useful for routing calls or operator-specific logic within applications. Always validate against this general format to ensure accuracy.
Convert Cambodian numbers to international format by removing the leading '0' and prepending '+855'. For example, 012 345 678 becomes +85512345678. This format is essential for international calls and ensures compatibility with global telecommunication systems, facilitating seamless connectivity.
Cambodia uses international prefixes like 001 (MPTC/Telecom Cambodia), 007 (Royal Telecam International), 008, 009, and 014-019 to select a specific international gateway operator when making calls from within Cambodia. This detail is important for applications handling domestic calls as it impacts operator selection and routing.
Validate Cambodian phone numbers upon user input within your application. This immediate validation prevents incorrect numbers from being stored in your database and helps to streamline the user experience, reducing potential errors and frustration later in the process. This practice also ensures data integrity and regulatory compliance from the outset.
Cambodian area codes, represented as 0[2-4], correspond to specific regions. For example, 023 designates Phnom Penh and 042 represents Kampong Cham. A comprehensive list is available on the MPTC website. Always validate against this official list to ensure accuracy and proper regional identification.
Store Cambodian phone numbers in a VARCHAR field with a length of 15 characters to accommodate the international format and potential extensions. Include the phone type (mobile, geographic, etc.) for easier filtering and analysis. Crucially, implement encryption to comply with data privacy regulations, a critical aspect of handling sensitive user information.
Yes, regular expressions (regex) are a powerful tool for Cambodian phone number validation. Use specific patterns for different number formats (e.g., geographic, mobile), but remember these patterns may need adjustments for specific operator prefixes and edge cases, requiring thorough testing to ensure accurate validation.
The national prefix for domestic calls within Cambodia is '0'. This prefix is typically removed when converting a number to the international format, ensuring correct dialing and routing within the Cambodian telephone network.
Cambodia uses different international call prefixes (001, 007, etc.) to allow users to select their preferred international gateway operator. Each prefix corresponds to a specific operator like MPTC (001) or Royal Telecam International (007). This gives users choice and potentially affects call costs or quality based on the operator's network.
Cambodian special service numbers include toll-free numbers starting with 1800 and premium-rate numbers beginning with 1900. These numbers have specific uses and billing structures, distinct from standard geographic or mobile numbers, and should be identified correctly in applications.
This guide provides comprehensive coverage of Cambodia phone number validation, equipping you with the knowledge and tools to integrate accurate phone number handling into your applications. You'll learn E.164 formatting standards, regex validation patterns, Cambodian mobile operator prefixes, area codes, best practices for data storage, and regulatory compliance requirements for the +855 country code.
Why Validate Cambodia Phone Numbers?
Correctly handling Cambodian phone numbers is crucial for several reasons:
Cambodia Phone Number Format and Structure
Cambodia's phone numbers adhere to the ITU-T E.164 international phone number format standard (E.164 11/10, effective November 2010). This standard defines a general format for international telephone numbers, ensuring global interoperability. The E.164 format limits phone numbers to a maximum of 15 digits, with the structure: [+][country code][area/operator code][subscriber number].
Cambodia Country Code: +855
Country Code: +855. This code uniquely identifies Cambodia in international calls. Prepend this to the number when dialing from outside Cambodia.
International Access Codes: Cambodia uses international access codes starting with 00, where the third digit identifies the operator's gateway. Currently active codes include:
These prefixes select a specific international gateway operator when making calls from within Cambodia. If your application handles calls originating from within Cambodia, consider offering users the option to select their preferred gateway.
National Prefix: 0
Cambodia Phone Number Formats by Type
Cambodian phone numbers fall into several categories: geographic (landline), mobile, and special service numbers.
Geographic Numbers (Landlines with Area Codes)
Geographic numbers are tied to specific regions within Cambodia. They follow this structure:
Where the first two digits after the 0 represent the area code. Geographic numbers have 6 or 7 subscriber digits after the area code.
Cambodia Area Codes by Region:
Validate area codes against the official TRC allocation list at trc.gov.kh to ensure accuracy.
Example: 023 123 4567 (Phnom Penh) → +855 23 1234567 (international format)
Mobile Numbers (Operator Prefixes)
Mobile numbers vary by operator and follow this general format:
Mobile numbers have 8 or 9 digits total (including the leading 0). The first two digits after the 0 identify the mobile operator. Most operators use 8-digit numbers (7 subscriber digits), but some use 9-digit numbers (8 subscriber digits).
Current Cambodia Mobile Operator Prefixes (verified via TRC Mobile Prefixes, accessed January 2025):
Note: Prefixes marked with * indicate 7-digit subscriber numbers (10 digits total including 0). All other prefixes use 6-digit subscriber numbers (9 digits total including 0).
Important: Operator prefixes may change as new allocations are made. Verify current prefixes with the TRC (trc.gov.kh/en/resources/mobile-prefixes/) for the most up-to-date information.
Examples:
Special Service Numbers
These include toll-free (1800 XXXX) and premium-rate (1900 XXXX) numbers. These numbers have specific uses and billing structures, so identify them correctly in your validation logic.
How to Validate Cambodia Phone Numbers Using Regex
Regular expressions (regex) provide a powerful way to validate Cambodia phone number formats. Here are production-ready patterns based on TRC specifications.
JavaScript Regex Validation Examples
// Geographic Number Validation (6 or 7 digits after area code) const geoPattern = /^0[2-7]\d{7,8}$/; console.log(geoPattern.test('0231234567')); // true (7 digits) console.log(geoPattern.test('023123456')); // true (6 digits) // Mobile Number Validation (8 or 9 digits total including leading 0) const mobilePattern = /^0(1[0-8]|3[18]|6[0-179]|7[0-18]|8[0-8]|9[0-38])\d{6,7}$/; console.log(mobilePattern.test('012345678')); // true (8 digits) console.log(mobilePattern.test('0762345678')); // true (9 digits) // International Format Validation (with +855 country code) const internationalPattern = /^\+855[1-9]\d{7,8}$/; console.log(internationalPattern.test('+85512345678')); // trueImportant: These regex patterns are based on current TRC allocations. Test your regex thoroughly with a variety of valid and invalid numbers. Some operators use longer subscriber numbers or have specific digit patterns.
Complete Phone Number Validation Function
A robust validation function should handle various scenarios, including cleaning the input and providing informative error messages.
function validateCambodianNumber(number) { const cleanNumber = number.replace(/\s+/g, ''); // Remove whitespace const geoPattern = /^0[2-7]\d{7,8}$/; const mobilePattern = /^0(1[0-8]|3[18]|6[0-179]|7[0-18]|8[0-8]|9[0-38])\d{6,7}$/; if (!mobilePattern.test(cleanNumber) && !geoPattern.test(cleanNumber)) { throw new Error('Invalid Cambodian phone number format'); } return cleanNumber; }Converting Cambodia Numbers to E.164 International Format
For international calls or data storage, convert numbers to E.164 international format by removing the national prefix (0) and prepending the country code (+855).
function toInternationalFormat(number) { const cleanNumber = number.replace(/^0/, ''); // Remove leading 0 return `+855${cleanNumber}`; } // Example usage console.log(toInternationalFormat('012345678')); // Output: +85512345678 console.log(toInternationalFormat('023 123 4567')); // Output: +855231234567How to Store Cambodia Phone Numbers in a Database
Store Cambodian phone numbers in your database using a VARCHAR field with a length of 15 characters to accommodate the E.164 international format and any potential extensions. Consider storing the phone number type (mobile, geographic, etc.) to facilitate filtering and analysis. Implement encryption for stored numbers to comply with data privacy regulations. For additional verification needs, consider integrating a phone lookup service to validate number ownership and carrier information.
CREATE TABLE user_contacts ( id SERIAL PRIMARY KEY, phone_number VARCHAR(15), phone_type ENUM('mobile', 'geographic', 'toll-free', 'premium'), operator_name VARCHAR(50), is_verified BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );Error Handling and User Feedback
Provide clear and user-friendly error messages when validation fails. Guide users on how to correct their input. For example, if a user enters an invalid operator prefix, display a message like "Invalid operator prefix. Check your number and try again."
Cambodia Phone Number Regulations and Data Privacy Compliance
Current Regulatory Status (as of January 2025):
Cambodia has not yet enacted comprehensive data protection legislation. The Ministry of Posts and Telecommunications (MPTC) released a draft Law on Personal Data Protection (LPDP) for consultation on July 25, 2023, but it has not progressed to enactment. The draft law's scope is limited to the private sector and does not apply to public authorities.
Current Legal Framework:
Data protection currently falls under the right to privacy, protected broadly under:
Key Regulatory Bodies:
Best Practice Requirements:
Until comprehensive data protection legislation is enacted, follow these best practices:
Advanced Implementation Tips
Frequently Asked Questions (FAQ)
What is the country code for Cambodia?
The country code for Cambodia is +855. When dialing from outside Cambodia, dial +855 followed by the area code (without the leading 0) and the subscriber number. For example, to call a Phnom Penh landline (023 123 4567) from the United States, dial: 011 (US exit code) + 855 (Cambodia) + 23 1234567.
How do I format a Cambodia phone number in E.164 format?
To format a Cambodia phone number in E.164 format, remove the leading 0 from the domestic number and prepend +855. For example, 012 345 678 becomes +85512345678. The E.164 format contains no spaces or special characters.
What are the main mobile operators in Cambodia?
The main mobile operators in Cambodia are Cellcard, Smart, Metfone, qb, Seatel, and CooTel. Each operator has specific prefix allocations that can be verified on the TRC website.
How many digits are in a Cambodia mobile phone number?
Cambodia mobile phone numbers contain 8 or 9 digits total, including the leading 0. This equals 7 or 8 subscriber digits after the operator prefix. Most operators use 8-digit numbers, but some prefixes (like 076, 096) use 9 digits.
How do I validate a Cambodia phone number in JavaScript?
Use regex patterns to validate Cambodia phone numbers:
const mobilePattern = /^0(1[0-8]|3[18]|6[0-179]|7[0-18]|8[0-8]|9[0-38])\d{6,7}$/; const isValid = mobilePattern.test('012345678'); // Returns true/falseWhat is Cambodia's national prefix?
Cambodia's national prefix is 0. It's used for domestic calls within Cambodia but must be removed when converting to international format.
Where can I verify Cambodia mobile operator prefixes?
Official Cambodia mobile operator prefixes are published by the Telecommunication Regulator of Cambodia (TRC) at trc.gov.kh/en/resources/mobile-prefixes/. The list is updated as new allocations are made. Always verify against the TRC's official list for the most current and accurate prefix allocations.
Are there data privacy requirements for storing Cambodia phone numbers?
While Cambodia has not yet enacted comprehensive data protection legislation as of January 2025, you should still follow best practices: obtain explicit user consent, implement encryption, maintain secure data handling, and provide data access and deletion rights to users. Treat phone numbers as personally identifiable information (PII) and implement appropriate security measures.
Summary
By following these guidelines, you ensure accurate and reliable Cambodia phone number handling in your applications, enhancing user experience and maintaining regulatory compliance. Remember to validate numbers using TRC-verified operator prefixes, convert to E.164 format for storage, and stay updated on regulatory changes from MPTC and TRC.