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.
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.
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 inaccount.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 requisitei18n
strings tocreate.html
, and to avoid making unnecessary calls to the API, I propose we move all the other formatting checks intorealtime_account_validation.js
so that the API call only happens if those checks pass.Proposal & Constraints
create.html
, per the JS internationalization processrealtime_account_validation.js
(including the email spam checks fromforms.py
) so that all formatting checks run before the API callThis will also be a helpful preparatory step for the JS form submission prevention step of #9205.
Additional context
Stakeholders
@cdrini