Skip to content

Conversation

@kartik-212004
Copy link
Contributor

What does this PR do?

Fixes the phone number validation issue for Ivory Coast (+225) by updating the input mask to accept 10-digit numbers instead of the outdated 8-digit format.

Ivory Coast migrated to a 10-digit numbering plan in 2021, but the react-phone-input-2 library still uses the old 8-digit mask (".. .. .. ..") which was truncating valid phone numbers. This PR adds a custom mask override (".. .. .. .. ..") to allow users to enter their complete 10-digit Ivorian phone numbers.

Visual Demo (For contributors especially)

Before:
https://www.loom.com/share/b72395f4f43c42a4ba28b8172b3fbad5

After:
https://www.loom.com/share/119641b0fbf6485cba8710dd83673c42

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A - This is a bug fix to align with current international numbering standards.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - Existing validation tests with libphonenumber-js already validate 10-digit CI numbers correctly. The fix updates only the UI input mask.

How should this be tested?

  1. Go to any Cal.com form that requires phone number input
  2. Select Ivory Coast (+225) from the country code dropdown
  3. Enter a valid 10-digit Ivorian phone number: 07 97 76 48 77
  4. Verify that all 10 digits are accepted (formatted as +225 07 97 76 48 77)
  5. Submit the form and verify validation passes

@vercel
Copy link

vercel bot commented Jan 5, 2026

@kartik-212004 is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jan 5, 2026
@github-actions github-actions bot added the 🐛 bug Something isn't working label Jan 5, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Pallava-Joshi
Pallava-Joshi previously approved these changes Jan 5, 2026
Copy link
Member

@Pallava-Joshi Pallava-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dhairyashiil
dhairyashiil previously approved these changes Jan 6, 2026
@dhairyashiil dhairyashiil added the run-ci Approve CI to run for external contributors label Jan 6, 2026
@dhairyashiil dhairyashiil enabled auto-merge (squash) January 6, 2026 01:44
@dhairyashiil dhairyashiil removed ready-for-e2e run-ci Approve CI to run for external contributors labels Jan 6, 2026
@edayeh8-ai
Copy link

Voyez comment apparaît le numéro du Bénin et celui de la côte d'ivoire sur les deux captures d'écran.
Screenshot_20260106-030542

Screenshot_20260106-030627

@dhairyashiil
Copy link
Member

Voyez comment apparaît le numéro du Bénin et celui de la côte d'ivoire sur les deux captures d'écran. !

So how should it appear? Should it be in the format 3 digits – 3 digits – 3 digits – 1 digit, or is the current 2 digits – 2 digits – 2 digits – 2 digits – 2 digits format correct?

In the attached video above, the 10 digits are accepted in the 2 digits – 2 digits – 2 digits – 2 digits – 2 digits format. and Could you please respond in English?

@edayeh8-ai

@edayeh8-ai
Copy link

Thank you for your quick response!

Let me clarify the correct format for both countries:

Benin (+229):

  • Correct format: 10 digits after country code
  • Official display format: 2 digits – 2 digits – 2 digits – 2 digits – 2 digits
  • Example: +229 01 65 52 66 57
  • Since 2025, all Benin numbers have 10 digits (mobile numbers now start with 01, followed by 8 more digits)

Ivory Coast (+225):

  • Correct format: 10 digits after country code
  • Official display format: 2 digits – 2 digits – 2 digits – 2 digits – 2 digits
  • Example: +225 07 97 76 48 77
  • Since 2021, all Ivory Coast numbers have 10 digits (mobile numbers start with 01, 05, 07, etc.)

The Issue:
Cal.com currently accepts the Benin number but rejects the last 2 digits of the Ivory Coast number, even though both countries now use the same 10-digit format.

Additionally, there is an inconsistent display formatting issue:

  • Benin numbers are displayed as: +229 016 552 665 7 (formatted as 3-3-3-1)
  • Ivory Coast numbers are displayed as: +225 07 72 24 25 (formatted as 2-2-2-2-2)

Both countries officially use the 2-2-2-2-2 format (five groups of 2 digits). The Benin number should be displayed as +229 01 65 52 66 57, not +229 016 552 665 7. This inconsistent formatting creates confusion for users.

Expected behavior:
Both Benin (+229) and Ivory Coast (+225) should:

  1. Accept exactly 10 digits after the country code
  2. Display numbers in the format: 2-2-2-2-2 (five groups of 2 digits)

The validation library likely hasn't been updated with Ivory Coast's 2021 numbering plan migration (from 8 to 10 digits), and needs to be updated with Benin's very recent 2025 migration as well.
Hope this clarifies the issue!

@edayeh8-ai
Copy link

Hello !
Still waiting for a solution 🙏

@dhairyashiil dhairyashiil dismissed stale reviews from Pallava-Joshi and themself via 2605484 January 6, 2026 22:17
Copy link
Member

@dhairyashiil dhairyashiil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, made changes.

Screenshot 2026-01-07 at 3 46 00 AM

and

Screenshot 2026-01-07 at 3 46 17 AM

@dhairyashiil
Copy link
Member

now both Benin (+229) and Ivory Coast (+225) accepts 10 digits and formated as 2-2-2-2-2

@dhairyashiil dhairyashiil added ready-for-e2e run-ci Approve CI to run for external contributors labels Jan 6, 2026
@dhairyashiil dhairyashiil disabled auto-merge January 6, 2026 22:21
@dhairyashiil dhairyashiil enabled auto-merge (squash) January 6, 2026 22:21
@dhairyashiil dhairyashiil merged commit b8b9251 into calcom:main Jan 6, 2026
81 of 90 checks passed
@dhairyashiil
Copy link
Member

Hello ! Still waiting for a solution 🙏

This will be available in the next release

@edayeh8-ai
Copy link

Bonjour ! J'attends toujours une solution 🙏

Cette fonctionnalité sera disponible dans la prochaine version.

When will the next version be available, because I'm still having trouble entering a full Ivorian phone number.

@edayeh8-ai
Copy link

Le Bénin (+229) et la Côte d'Ivoire (+225) acceptent désormais tous deux 10 chiffres au format 2-2-2-2-2.

When will the next version be available, because I'm still having trouble entering a full Ivorian phone number.

@edayeh8-ai
Copy link

@dhairyashiil
Copy link
Member

dhairyashiil commented Jan 9, 2026

See this video https://github.com/user-attachments/assets/0e667a0d-020a-4db7-a19d-fff0be22dbb6

@edayeh8-ai it's live now, please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phone number validation issue for Ivory Coast (+225) - rejects valid 10-digit numbers

4 participants