Skip to content

[BUG] Trim whitespace from phone numbers and country code #10755

@Vani-1107

Description

@Vani-1107

Bug Description

This PR normalizes phone-related fields before sending them downstream.

  • Trims leading and trailing whitespace from phone number and phone country code
  • Treats whitespace-only values (e.g. " ") as null.

Expected Behavior

This PR normalizes phone-related fields before sending them downstream.

  • Trims leading and trailing whitespace from phone number and phone country code
  • Treats whitespace-only values (e.g. " ") as null.

Actual Behavior

This PR normalizes phone-related fields before sending them downstream.

  • Trims leading and trailing whitespace from phone number and phone country code
  • Treats whitespace-only values (e.g. " ") as null.

Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'

Context For The Bug

No response

Environment

Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the x-request-id response header to help us debug your issue.

If not (or if building/running locally), please provide the following details:

  1. Operating System or Linux distribution:
  2. Rust version (output of rustc --version): ``
  3. App version (output of cargo r --features vergen -- --version): ``

Have you spent some time checking if this bug has been raised before?

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

C-bugCategory: BugS-awaiting-triageStatus: New issues that have not been assessed yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions