-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Use isValidPersonName for teachers name validation #35229
fix: Use isValidPersonName for teachers name validation #35229
Conversation
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hey @paultsimura, regex for |
Thanks! Lets wait for a consensus in Slack. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeRecord_2024-01-26-20-42-07.mp4Android: mWeb ChromeRecord_2024-01-26-20-34-42.mp4iOS: NativeSimulator.Screen.Recording.-.iPhone.15.Plus.-.2024-01-26.at.20.00.36.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Plus.-.2024-01-26.at.20.04.08.mp4MacOS: Chrome / SafariScreen.Recording.2024-01-26.at.6.34.42.PM.movMacOS: DesktopScreen.Recording.2024-01-26.at.8.53.40.PM-1.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
EDIT: We still need approval for copy update https://expensify.slack.com/archives/C01GTK53T8Q/p1706260058994859
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.4.33-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀
|
if (!ValidationUtils.isValidLegalName(values.firstName)) { | ||
ErrorUtils.addErrorMessage(errors, 'firstName', 'privatePersonalDetails.error.hasInvalidCharacter'); | ||
} else if (!values.firstName) { | ||
if (!values.firstName || !ValidationUtils.isValidPersonName(values.firstName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it was by design at the time of that PR, but we should had used isValidDisplayName
here instead, this caused #46385
Details
Make teachers' name inputs less strict: allow all but special chars – the same as in Bank Account flow.
Fixed Issues
$ #35144
PROPOSAL: #35144 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
I am a teacher
(orI know a teacher
).First Name
andLast Name
fields!
)PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-compressed.mp4
Android: mWeb Chrome
chrome-compressed.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-26.at.10.44.55-compressed.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-26.at.10.45.51-compressed.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-01-26.at.10.35.19-compressed.mp4
MacOS: Desktop
Screen.Recording.2024-01-26.at.10.43.13-compressed.mp4