fix(payment-methods): add ph code validation in customer create flow - #13752
Open
prasunna09 wants to merge 1 commit into
Open
fix(payment-methods): add ph code validation in customer create flow#13752prasunna09 wants to merge 1 commit into
prasunna09 wants to merge 1 commit into
Conversation
Changed Files
|
|
|
||
| /// Maximum length allowed for a phone country (calling) code, matching the `VARCHAR(8)` | ||
| /// column used to store it. | ||
| pub const MAX_PHONE_COUNTRY_CODE_LENGTH: usize = 8; |
Contributor
There was a problem hiding this comment.
Should this go to consts.rs ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Setup:
Test 1 — valid phone_country_code ("+1"):
HTTP/1.1 200 OK
Test 2 — invalid phone_country_code ("United States", the exact value from the bug report):
HTTP/1.1 400 Bad Request (previously 500)
Confirmed via the server log too — the invalid request is handled as a normal BadRequest, not a panic or unhandled DB error.
Checklist
cargo +nightly fmt --allcargo clippy