Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Signup Form label mismatch for error handling #123

Open
1 of 2 tasks
mtahafarooq opened this issue Apr 7, 2019 · 6 comments · May be fixed by #124
Open
1 of 2 tasks

Signup Form label mismatch for error handling #123

mtahafarooq opened this issue Apr 7, 2019 · 6 comments · May be fixed by #124

Comments

@mtahafarooq
Copy link
Contributor

I'm submitting a

(Check one with "x" from given options)

  • Bug report
  • Feature request

Current behavior

In sign up form when a user chooses a fully numeric password and clicks the submit button, the server returns a validation error but it does not get displayed under the password's form field.

Expected behavior

The system should show the validation error message under the password's form field.

Steps to reproduce

  1. Open signup form.
  2. Fill the password field with number.
  3. Click submit button.
  4. No validation error is shown.

Related screenshots

Screenshot from 2019-04-07 15-39-03

Other information

System information

Ubuntu 18.04 LTS

@mtahafarooq
Copy link
Contributor Author

@Shekharrajak I've been able to fix this issue locally, the problem is that when the validation error is returned the field name is "password1" and when this label is passed to formItemForLabel function, it is unable to fetch the form item since the relevant form item has the label "password" and not "password1".
If we change the label to "password1" then it does gets fixed but then the label for the password field is "Password 1" which I think is not acceptable.
Other way to solve it is to fix the field on backend. What do you say?

@mtahafarooq
Copy link
Contributor Author

@Shekharrajak I've done some research on backend and I see that rest_auth is being used and it requires the password fields to be password1 and password2.
Reference: https://django-rest-auth.readthedocs.io/en/latest/api_endpoints.html#registration

What do you say?

@Shekharrajak
Copy link
Member

Thanks @mtahafarooq for pointing it out. Can you check once how this functionality works in https://github.com/Cloud-CV/EvalAI repo and if you find the same issue there as well, then we will go to backend otherwise front-end change will be sufficient.

@mtahafarooq
Copy link
Contributor Author

@Shekharrajak it does not appear there. Should I make a PR with the fix?

@Shekharrajak
Copy link
Member

@mtahafarooq , Yes go ahead .

@mtahafarooq mtahafarooq linked a pull request Apr 8, 2019 that will close this issue
@mtahafarooq
Copy link
Contributor Author

Fixed #124

@mtahafarooq mtahafarooq changed the title Signup From label mismatch for error handling Signup Form label mismatch for error handling Apr 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants