Skip to content
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: Full name validation in register page Issue#1250 #1348

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jciasenza
Copy link

Description

What changed?

When registering as a user on the MFE Authentication Registration tab, in the Full Name field
Validate that it contains at least 3 up to 30 characters
since it only allowed 1, and I also made a validation so that it does not allow special characters or numbers, only alphabets.

Issue:
(#1250)

Screenshot from 2024-11-05 11-00-29

And I have modified the error text:

Screenshot from 2024-11-05 11-00-14

How Has This Been Tested?

And Testing OK

If something needs to be modified, let me know, thank you!!!
Atte
Juan Carlos (Aulasneo)

Developer Checklist

Test suites passing
Documentation and test plan updated, if applicable
Received code-owner approving review

@jciasenza jciasenza requested a review from a team as a code owner November 5, 2024 14:14
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 5, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @jciasenza!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If 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 @openedx/2u-infinity. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@jciasenza
Copy link
Author

I made a new change in the validation since it is necessary to readable characters for different languages ​​such as letters with accents, umlauts and other language characters:
image

@jciasenza
Copy link
Author

jciasenza commented Nov 14, 2024

Hi, itsjeyd, @arbrandes Could you check this PR

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Nov 26, 2024
@jciasenza
Copy link
Author

jciasenza commented Dec 5, 2024

Hi @brian-smith-tcril , what do you think of this change I made to the validation of the fullname field?
@hinakhadim, had asked for it in issue #1250.
If it's ok, it could be merged !!!

Ready to merge !!!

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.74%. Comparing base (3e20fca) to head (9cdfc34).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1348      +/-   ##
==========================================
+ Coverage   87.69%   87.74%   +0.05%     
==========================================
  Files         124      124              
  Lines        2299     2309      +10     
  Branches      646      646              
==========================================
+ Hits         2016     2026      +10     
  Misses        274      274              
  Partials        9        9              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brian-smith-tcril brian-smith-tcril added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Dec 9, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@mphilbrick211
Copy link

@openedx/2u-infinity this is ready for review. Thanks!

@jciasenza
Copy link
Author

jciasenza commented Dec 9, 2024

Thanks @mphilbrick211 , @brian-smith-tcril !!!

@brian-smith-tcril
Copy link
Contributor

It looks like this is a product change that needs to go through product review. I see @hinakhadim made the original issue - did that make it through review? https://openedx.atlassian.net/wiki/spaces/COMM/pages/3875962884/How+to+submit+an+open+source+contribution+for+Product+Review

@jciasenza
Copy link
Author

Ok, so I hope they approve it.

@ormsbee
Copy link

ormsbee commented Dec 9, 2024

@jciasenza: Please note that human names are really, really complicated, which is part of why the validation for this is so relaxed.

For instance:

Validate that it contains at least 3 up to 30 characters

Korean names are usually three characters (1 for the family, 2 for the given), but they can be as short as two (1 for family, 1 for given). (This works because the Korean script can pack a full syllable into a single character by compositing smaller glyphs.) I'd hazard a guess that single character names do exist out there somewhere.

On the other hand, Hawaiian names can be very long. There's an article about a woman whose family name alone is 36 characters. Hawaii's identification guidelines:

Driver’s Licenses and State ID cards will now provide space for names up to a total of 120 characters with the breakdown as follows: 40 last name, 40 first name, 35 middle name, 5 suffix (ex. Jr. or Sr.).

I know those two examples off the top of my head, because my mother's family is Korean and I grew up in Hawaii. There are many other cases out there.

I also made a validation so that it does not allow special characters or numbers, only alphabets.

Are dashes, apostrophes, and okinas counted as letters for the purposes of Unicode? (I honestly don't know the answer.) Regardless, again, I don't think we want to make any assumptions here.

Falsehoods programmers believe about names gives an overview of some of these issues.

The question is what we're trying to guard against here. If the user makes a mistake, they can always change their name later. If the user is intentionally trying to put false data into the system, then we can't really stop that with extra rules–they'll just put false data that conforms to those rules. I don't think it's worth the risk of blocking legitimate names in order to try to prevent that.

@jciasenza
Copy link
Author

Hello @ormsbee, I performed the validations as requested by
@hinakhadim in issue #1250, but I agree with what you think, there is no problem leaving it without validations.
I also think that it is extremely difficult to have such a long name to display in the different components of the platform.

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@mphilbrick211 mphilbrick211 added the product review PR requires product review before merging label Dec 9, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR needs test run Author's first PR to this repository, awaiting test authorization from Axim open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Status: Product Review
Development

Successfully merging this pull request may close these issues.

7 participants