Closed Ankit-akumar closed 3 years ago
Thanks. We should add validations on the fornt end as well. Would you like to work on this?
Yeah sure that would be great. I believe I would have to alter the validateDetails method accordingly.
@epicadk These are the rules I have implemented -> 1) The username should consist of 6 to 30 characters inclusive. 2) The username can only contain alphanumeric characters and underscores (_) Anything else?
You can find the server side validation here. Please try to match them.
The max and min length of any field is not mentioned there. Could you please verify once?
I think you can find them there https://github.com/anitab-org/mentorship-backend/tree/d9dcb53da75583b3693b2e917db1ab8c54576a46/app/api/validations
I have made the changes as per the links you provided. And as said in the readme I ran the tests. On testing, I saw some test cases are failing. But I don't think this has anything to do with the changes I made (these tests were already failing before I made the changes). Moreover, the build also fails because of a lot of deprecation warnings. Shall I open the PR?
Yup open the pr. We are looking into those.
hey, @epicadk I have opened the PR for the same. Please review this
Is your feature request related to a problem? Please describe.
I have just started exploring this project and was testing the apk provided in the User Interface design. I was trying to sign up for the app and started giving some random/invalid inputs. I felt that how the user is notified about the mistakes he/she did can be improved.
Describe the solution you'd like
For example in the provided screenshot, instead of just telling the user "Your username is invalid" the user should be notified of the exact reason for that like "Username should not contain whitespaces or blanks".
Additional context
The change is small but would make the life of a naive user much easy :-)