-
Notifications
You must be signed in to change notification settings - Fork 3.5k
P2P KYC - Fix errors at field level #7812
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
Conversation
marcaaron
left a comment
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.
Thanks for finding this! 🙇 Just left a couple style comments.
|
|
||
| this.getErrors = () => formHelper.getErrors(props); | ||
| this.clearError = path => formHelper.clearError(props, path); | ||
| getErrors() { |
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.
style - needs a doc with @returns {Object}
| return `${this.props.translate(this.fieldNameTranslationKeys[fieldName])} ${this.props.translate('common.isRequiredField')}.`; | ||
| } | ||
|
|
||
| clearError(path) { |
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.
style - needs a doc with @param {String} path
| } | ||
|
|
||
| clearError(path) { | ||
| return this.formHelper.clearError(this.props, path); |
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.
Probably can skip the return since clearError() returns void
|
Updated |
|
✋ 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 @marcaaron in version: 1.1.40-0 🚀
|
|
@nkuoch @marcaaron |
|
I just checked it off thanks |
|
🚀 Deployed to production by @yuwenmemon in version: 1.1.40-2 🚀
|
Details
When there was an error at field level, the field didn't get red, and the corresponding error didn't show up.
It's because getErrors was always sending the original props, not the updated ones that were received after an Onyx change.
Now, I'm passing the right props.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/197281
Tests / QA Steps
Try to transfer your wallet balance.
When asked for your personal additional details, submit the form with empty fields.
Required fields should get red and with a corresponding error message.
Tested On
Screenshots
Web