-
Notifications
You must be signed in to change notification settings - Fork 19
fix: correct field error labels in purchase confirm action #234
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -75,9 +75,9 @@ export const action: ActionFunction = async ({ request }) => { | |
| } | ||
|
|
||
| const fieldErrors = { | ||
| bankName: validateRequired('Nomor WhatsApp', bankName), | ||
| bankAccountNumber: validateRequired('Nama Bank', bankAccountNumber), | ||
| bankAccountName: validateRequired('Nomor Rekening', bankAccountName), | ||
| bankName: validateRequired('Nama Bank', bankName), | ||
|
Collaborator
Author
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. These labels are now correct, but |
||
| bankAccountNumber: validateRequired('Nomor Rekening', bankAccountNumber), | ||
|
Collaborator
Author
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. Can we add a regression test around this mapping? Right now there doesn’t seem to be any route/action coverage for |
||
| bankAccountName: validateRequired('Nama Pemilik Rekening', bankAccountName), | ||
| amount: validateRequired('Nominal', amount), | ||
| } | ||
|
|
||
|
|
||
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.
These labels now match the
<Field label>props below, but this route still never readsuseActionData()or passesfieldErrorsback into the form. So a failed POST still will not render these server-side labels anywhere, and there is no focused regression test covering that path. If the intent is a user-visible validation fix, we probably need to plumbfieldErrorsinto the fields or add an action-level test that proves this branch matters.