-
-
Notifications
You must be signed in to change notification settings - Fork 171
replace "First name" and "Surname" input fields with a single "Full Name" field #1084
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
Changes from 1 commit
5bbb161
d3fd1b5
15e935b
0559773
0b7c859
2229df0
f8684ef
5a0f11b
b49a0df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,15 +1,10 @@ | ||||||||||||||||||||||||||||||||||
| import z from "zod"; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| export const slideOneSchema = z.object({ | ||||||||||||||||||||||||||||||||||
| firstName: z | ||||||||||||||||||||||||||||||||||
| name: z | ||||||||||||||||||||||||||||||||||
| .string() | ||||||||||||||||||||||||||||||||||
| .trim() | ||||||||||||||||||||||||||||||||||
| .min(2, "Min name length is 2 characters.") | ||||||||||||||||||||||||||||||||||
| .max(50, "Max name length is 50 characters."), | ||||||||||||||||||||||||||||||||||
| surname: z | ||||||||||||||||||||||||||||||||||
| .string() | ||||||||||||||||||||||||||||||||||
| .trim() | ||||||||||||||||||||||||||||||||||
| .min(2, "Min name length is 2 characters.") | ||||||||||||||||||||||||||||||||||
| .min(1, "Min name length is 1 characters.") | ||||||||||||||||||||||||||||||||||
| .max(50, "Max name length is 50 characters."), | ||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adjusting the minimum length for the name field The current minimum length of 1 character for the Consider increasing the minimum length to ensure more meaningful name entries. For example: - .min(1, "Min name length is 1 characters.")
+ .min(2, "Min name length is 2 characters.")Additionally, you might want to consider adding a regex pattern to ensure the name contains at least two words for a full name, similar to the username field. 📝 Committable suggestion
Suggested change
💡 Codebase verification Issues Found:
Please update all occurrences of 🔗 Analysis chainVerify impact on existing data and functionality The change from separate Please run the following script to check for any other occurrences of Ensure that all relevant parts of the application are updated to use the new Apologies for the errors in the previous script. Let's run a corrected script to search for occurrences of 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for occurrences of firstName and surname in the codebase
echo "Checking for 'firstName' occurrences:"
rg --type typescript --type javascript 'firstName'
echo "Checking for 'surname' occurrences:"
rg --type typescript --type javascript 'surname'
Length of output: 318 Script: #!/bin/bash
# Description: Check for occurrences of firstName and surname in the codebase
echo "Checking for 'firstName' occurrences in .ts and .js files:"
rg 'firstName' --glob '*.ts' --glob '*.js'
echo "Checking for 'surname' occurrences in .ts and .js files:"
rg 'surname' --glob '*.ts' --glob '*.js'
Length of output: 445 |
||||||||||||||||||||||||||||||||||
| username: z | ||||||||||||||||||||||||||||||||||
| .string() | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
💡 Codebase verification
Remaining references to
firstNameandsurnamefound. Please update all instances to use the newnamefield.app/(app)/alpha/settings/profile.tscontains references tofirstNameandsurname.🔗 Analysis chain
LGTM! Verify database schema consistency.
The change from separate
firstNameandsurnamefields to a singlenamefield in the database query aligns with the PR objectives. This modification correctly reflects the consolidation of user name information.To ensure consistency across the codebase, please run the following script to verify that all references to
firstNameandsurnamehave been updated: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.
This can be safely ignored, since this alpha/settings page is legacy and will be deleted.
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.
@John-Paul-Larkin, understood. I'll note that the
app/(app)/alpha/settingspage is legacy and will be deleted.(_/)
(._.)
/
✏️ Learnings added