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

Move registration field formatting checks from backend -> frontend #9203

Open
rebecca-shoptaw opened this issue May 1, 2024 · 1 comment
Assignees
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 2 Important, as time permits. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed]

Comments

@rebecca-shoptaw
Copy link
Collaborator

rebecca-shoptaw commented May 1, 2024

Dependency to epic #7694.

For the realtime validation in realtime_account_validation.js, a number of simple formatting checks (such as screenname length and email format) unnecessarily happen in the API validation endpoint in account.py.

Describe the problem that you'd like solved

Since we're now adding frontend password format validation to realtime_account_validation.js and the requisite i18n strings to create.html, and to avoid making unnecessary calls to the API, I propose we move all the other formatting checks into realtime_account_validation.js so that the API call only happens if those checks pass.

Proposal & Constraints

  1. Prepare all necessary error messages strings in create.html, per the JS internationalization process
  2. Add relevant if-conditions and return statements to realtime_account_validation.js (including the email spam checks from forms.py) so that all formatting checks run before the API call

This will also be a helpful preparatory step for the JS form submission prevention step of #9205.

Additional context

Stakeholders

@cdrini

@rebecca-shoptaw rebecca-shoptaw added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] registration Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] labels May 1, 2024
@rebecca-shoptaw
Copy link
Collaborator Author

Closing this for now to determine whether necessary and pick back up later as part of the refactor process if so!

@rebecca-shoptaw rebecca-shoptaw removed the State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] label May 8, 2024
@rebecca-shoptaw rebecca-shoptaw self-assigned this May 10, 2024
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 2 Important, as time permits. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed]
Projects
None yet
Development

No branches or pull requests

2 participants