-
Notifications
You must be signed in to change notification settings - Fork 240
fix: adding value length check for full name field #1561
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: master
Are you sure you want to change the base?
Conversation
|
Thanks for the pull request, @cmltaWt0! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
75311cf to
8e17638
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1561 +/- ##
==========================================
+ Coverage 87.58% 87.59% +0.01%
==========================================
Files 124 124
Lines 2303 2305 +2
Branches 643 648 +5
==========================================
+ Hits 2017 2019 +2
Misses 277 277
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @syedsajjadkazmii! Are you able to review this for us? |
| fieldError = formatMessage(messages['empty.name.field.error']); | ||
| } else if (URL_REGEX.test(value) || HTML_REGEX.test(value) || INVALID_NAME_REGEX.test(value)) { | ||
| fieldError = formatMessage(messages['name.validation.message']); | ||
| } else if (value && value.length > 255) { |
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.
I'm concerned about the hardcoded 255 here. I'd prefer to have a shared source of truth for the max length between the backend and the frontend, but if that's not feasible then at least using a constant instead of magic numbers here and in the message could work.
|
Flagging Brian's comment for you, @cmltaWt0! |
|
@brian-smith-tcril @mphilbrick211 to speed up the work @filippovskii09 will continue the PR this week. |
Description
Fixing an error when a new user tries registering on the platform with a full name longer than 255 characters.
Now the request to the backend will not be sent because validation fails:
I also created a MR#34577 to Platform so that the backend would not miss such errors. But validation on the backend is just a fuse. It’s better not to send an invalid request to the backend.
It's a recreation of #1242