-
Notifications
You must be signed in to change notification settings - Fork 153
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: adding value length check for full name field #1242
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, @DmytroAlipov! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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. |
Hi @openedx/2u-vanguards! This is all set for review. |
Friendly follow-up on this, @openedx/2u-vanguards! |
92b5a9e
to
4b2eb25
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1242 +/- ##
==========================================
+ Coverage 87.69% 87.70% +0.01%
==========================================
Files 124 124
Lines 2299 2301 +2
Branches 646 647 +1
==========================================
+ Hits 2016 2018 +2
Misses 274 274
Partials 9 9 ☔ View full report in Codecov by Sentry. |
Hi @openedx/vanguards @openedx/2u-vanguards - checking in on this. |
4b2eb25
to
076b078
Compare
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.
Changes look good. Thanks
@@ -126,6 +126,11 @@ const messages = defineMessages({ | |||
defaultMessage: 'Enter a valid name', | |||
description: 'Validation message that appears when fullname contain URL', | |||
}, | |||
'name.validation.length.message': { | |||
id: 'name.validation.message', | |||
defaultMessage: 'Full name can not be longer than 255 symbols', |
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.
Do we need product approval on this message copy? If we don't, then maybe we can have an error message as for username field.
Full name must be between 1 and 255 characters
?
Not sure but please let me know if my comment makes sense
@@ -94,6 +94,25 @@ describe('NameField', () => { | |||
); | |||
}); | |||
|
|||
it('should check for long full name error', () => { |
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.
it('should check for long full name error', () => { | |
it('should validate for full name length', () => { |
076b078
to
c4f3824
Compare
@DmytroAlipov I think the changes here are obsolete since we have limited the username to 30 characters already:
Do you think this is still relevant? |
Hi @farhaanbukhsh ! |
yes @DmytroAlipov ! The validation is already being done using
This is a server side call which calls Possibly 🤔 The real bug 🐛 is not disabling the submit button on validation issues. What do you say? |
@farhaanbukhsh yes, I agree. |
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.