Make reason field required when closing account#85682
Make reason field required when closing account#85682
Conversation
The validate function in CloseAccountPage only checked phoneOrEmail as a required field. This adds reasonForLeaving to the required fields array so users must provide a reason before closing their account. Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
…orLeaving Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
… SearchRowSkeleton Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Fixed the failing typecheck. The error was in Changes:
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot please remove the unrelated change in src/components/Search/SearchLoadingSkeleton.tsx and mark this ready for review. |
|
Closing this PR because the branch was created as an orphan (no shared history with main), causing the unrelated SearchLoadingSkeleton.tsx change to appear in the diff. Recreating with a clean branch in a new PR. |
|
Replacement PR created: #85701 — clean branch with only the CloseAccountPage.tsx change, marked as ready for review. |
Explanation of Change
The
validatefunction inCloseAccountPage.tsxonly listedphoneOrEmailas a required field when callinggetFieldRequiredErrors. ThereasonForLeavingfield was not included, so users could close their account without providing a reason and no validation error was shown.This adds
reasonForLeavingto the required fields array so thatgetFieldRequiredErrorswill now also check it, displaying the standard "This field is required" error when the reason field is left empty.Fixed Issues
$ #85632
PROPOSAL: #85632 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari