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
Add HTML validation to registration form #9245
Add HTML validation to registration form #9245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, a few opportunities to DRY things. Putting up on testing now for a whirl
tested on testing.openlibrary.org and I can't seem to get the email html error to appear 🤔 |
cc55b39
to
b00336e
Compare
3844f63
to
732820a
Compare
Update: Fixed! Was a result of |
732820a
to
ec98583
Compare
ec98583
to
749b4c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm ; we noticed we were having trouble creating an account on testing.openlibrary.org and staging.openlibrary.org ! I didn't test doing a full registration flow on the realtime validation PR that preceded this one, so perhaps something is up there.
Otherwise I tested on FF and the errors were showing up in the right spots! 👍
openlibrary/plugins/openlibrary/js/realtime_account_validation.js
Outdated
Show resolved
Hide resolved
749b4c0
to
91b86cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! I played around with it a bit more, and it seems like the +
emails no longer work! They're treated as already registered by IA. I found a workaround for testing it though, and was able to fully create an account on testing 👍
But it seems like our realtime email validation does not correctly detect this. Would you mind creating an issue to fix this?
@cdrini sure thing!! |
Closes #9244.
Feature. Adds HTML attributes to registration form inputs to prevent submission with improperly formatted data.
Technical
Implementation involved removing
validate
class to prevent duplicated realtime validation, and adding appropriate attributes to inputs informs.py
. Also involved triggering theHTML
validation manually before thegrecaptcha
process, a strategy that will likely be re-used/expanded for part 2 of #9205.Testing
/account/create
Screenshot
Stakeholders
@cdrini