Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Invalid phone error on prefill with plus(+) sign #15046

Merged
merged 4 commits into from
May 17, 2024

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented May 15, 2024

What does this PR do?

Loom showing it is fixed

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

How should this be tested?

  • Make an event-type with a booking question with identifier 'phone' and chose type = Phone
  • Prefill that event with query param phone=+919999999999
  • See the loom

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 10:48am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 10:48am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 10:48am

Copy link
Contributor

github-actions bot commented May 15, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@keithwillcode keithwillcode added consumer core area: core, team members only labels May 15, 2024
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hariombalhara and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented May 15, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented May 15, 2024

Current Playwright Test Results Summary

✅ 34 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/17/2024 01:29:52pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 141a9c6

Started: 05/17/2024 01:28:10pm UTC

⚠️ Flakes

📄   apps/web/playwright/profile.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Can update a users email (verification enabled)
Retry 2Retry 1Initial Attempt
39.85% (104) 104 / 261 runs
failed over last 7 days
31.80% (83) 83 / 261 runs
flaked over last 7 days

View Detailed Build Results


Copy link

linear bot commented May 15, 2024

@github-actions github-actions bot added Medium priority Created by Linear-GitHub Sync 🐛 bug Something isn't working labels May 15, 2024
@hariombalhara hariombalhara changed the title fix: Invalid phone error fix: Invalid phone error on prefill with + May 15, 2024
@hariombalhara hariombalhara changed the title fix: Invalid phone error on prefill with + fix: Invalid phone error on prefill with plus(+) sign May 15, 2024
@keithwillcode keithwillcode added this to the v4.2 milestone May 15, 2024
@hariombalhara hariombalhara marked this pull request as ready for review May 16, 2024 11:16
@graphite-app graphite-app bot requested a review from a team May 16, 2024 11:16
@dosubot dosubot bot added the bookings area: bookings, availability, timezones, double booking label May 16, 2024
} else if (field.type === "phone") {
// + in URL could be replaced with space, so we need to replace it back
// Replace the space(s) in the beginning with + as it is supposed to be provided in the beginning only
newResponses[field.name] = value.replace(/^ +/, "+");
Copy link
Member Author

Choose a reason for hiding this comment

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

'+' in RegExp is a special character by default. So, it isn't replacing' +'. It is replacing '1 or more spaces'

Copy link

graphite-app bot commented May 16, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (05/16/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working consumer core area: core, team members only Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3708] Invalid Phone Error
3 participants