Repository navigation
fix(apm): rename phone "value" to "number" to conform with the BE API contracts - #225
Merged
Merged
Conversation
edwin-joseph-cko
approved these changes
Nov 28, 2025
tomasz-pazdziurek-cko
marked this pull request as ready for review
November 28, 2025 14:47
tomasz-pazdziurek-cko
marked this pull request as draft
November 28, 2025 14:48
tomasz-pazdziurek-cko
marked this pull request as ready for review
December 2, 2025 09:45
roshan-gorasia-cko
added a commit
that referenced
this pull request
Sep 8, 2026
The prefill computed in NextSteps never reached the phone field. The field reads a `value` prop; the form's only call site passed it as `number`, and `Props<T>`'s `[key: string]: any` index signature let the misnamed prop typecheck and vanish into the input's attributes. A prefilled phone rendered as an empty box on the locale default country. `normalizePhoneValue` also returned the pre-#225 `value` key, so a prefilled phone submitted without the user touching the field posted `value` where the API expects `number`. It now emits `number`, matching the declared `PhoneState` and the field's own `oninput`; both keys are still accepted as input, so the documented `initialData` object form keeps working. `validateField` read `value` too, which made `required` pass vacuously for any phone once the field had emitted its own shape. It now reads the national number under either key, so an empty phone is caught. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Description
We're sending phone number as "value" field instead of "number" and BE ignores it. As a result, we end up sending empty phone number to the PSP.
Solution
Rename "value" field to "number" to conform with the BE API contracts.
Demo
Screen.Recording.2025-11-28.at.13.03.50.mov
Checklist
yarn bump-versionNotes
Jira Issue