Fix real-time username/email formatting and OL availability validation #9189
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]
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 === ""
tovalue !== ""
in a few places, and the DRYing up should be quite simple -- will involve makingrenderError
andclearError
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
andlabel[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
The text was updated successfully, but these errors were encountered: