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 real-time username/email formatting and OL availability validation #9189

Closed
Tracked by #2055
rebecca-shoptaw opened this issue Apr 29, 2024 · 0 comments · Fixed by #9190
Closed
Tracked by #2055

Fix real-time username/email formatting and OL availability validation #9189

rebecca-shoptaw opened this issue Apr 29, 2024 · 0 comments · Fixed by #9190
Assignees
Labels
Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [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 Apr 29, 2024

Describe the problem that you'd like solved

There is good existing code to real-time validate username/email formatting and OL availability, which hasn't been running because of a tiny typo in the code.

This PR fixes that typo and also DRYs up a lot of unnecessarily duplicated and difficult to read logic in realtime_account_validation.js.

Proposal & Constraints

The fix involves just changing !value === "" to value !== "" in a few places, and the DRYing up should be quite simple -- will involve making renderError and clearError functions to be reused for email, username, and password.

Since the naming is very consistent for the inputs in the registration form (the only place this is currently used), we should be able to pass in a simple string, i.e. "emailAddr", to generate #emailAddr and #emailAddrMessage and label[for="emailAddr"] where needed, but I'll be sure to make a note re: the dependence on the current naming conventions.

Additional context

Stakeholders

@cdrini @jimchamp

@rebecca-shoptaw rebecca-shoptaw added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Apr 29, 2024
@rebecca-shoptaw rebecca-shoptaw self-assigned this Apr 29, 2024
@rebecca-shoptaw rebecca-shoptaw added the Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] label May 1, 2024
@rebecca-shoptaw rebecca-shoptaw changed the title Streamline jQuery logic in realtime_account_validation.js Fix and DRY up live registration form validation May 1, 2024
@rebecca-shoptaw rebecca-shoptaw changed the title Fix and DRY up live registration form validation Fix real-time username/email validation May 1, 2024
@rebecca-shoptaw rebecca-shoptaw changed the title Fix real-time username/email validation Fix real-time username/email formatting and OL availability validation May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed]
Projects
None yet
1 participant