Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Add validation for empty name in edit profile. #139

Open
aaryankotharii opened this issue Sep 20, 2020 · 8 comments · May be fixed by #143
Open

Add validation for empty name in edit profile. #139

aaryankotharii opened this issue Sep 20, 2020 · 8 comments · May be fixed by #143
Assignees
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. good first issue Good for newcomers.

Comments

@aaryankotharii
Copy link
Contributor

Describe the bug
While editing the profile, if name field is emptied, the backend accepts an empty name but does not change it. Hence its better to disable save button in EditProfile View if name is empty.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Edit Profile View.
  2. Empty Name textfield.
  3. click save.
  4. there will be a - for name in Profile View.

Expected behavior
save button in EditProfile View should be disabled if name is empty.

Screenshots

updating empty Name Name is empty ( - ) logout and login

Simulator :

  • Device: iPhone SE
  • iOS: 13.7
  • Xcode: 11.7
@yugantarjain yugantarjain added Category: Coding Changes to code base or refactored code that doesn't fix a bug. good first issue Good for newcomers. Status: Available Issue was approved and available to claim or abandoned for over 3 days. Hacktoberfest labels Oct 1, 2020
@ednofedulo
Copy link

can i work on this?

@ednofedulo
Copy link

Since this issue is labeled with Hacktoberfest label, this repository need to add hacktoberfest to its topics, otherwise the contributions made here would not be contabilized to the event

@yugantarjain
Copy link
Contributor

Since this issue is labeled with Hacktoberfest label, this repository need to add hacktoberfest to its topics, otherwise the contributions made here would not be contabilized to the event

You just made a PR, can you confirm if it updated your dashboard or not?

@ednofedulo
Copy link

Before you closed it, it appeared in the dashboard but with this status image

@aaryankotharii
Copy link
Contributor Author

Yes, Hacktobfest topic and hacktoberfest-accepted label is a requisite for pr to be counted.
here is the official update
Screenshot 2020-10-04 at 11 57 08 AM

@yugantarjain
Copy link
Contributor

Got it, thanks!

@yugantarjain
Copy link
Contributor

yugantarjain commented Oct 4, 2020

@ednofedulo I'm assigning it to you, thanks a lot for your interest in contributing to the Mentorship iOS project. For the Hacktoberfest, I'll confirm with the team if we're doing it or not.

A few suggestions for your next PR:

  1. We don't want to disable the entire form, just the save button
  2. Attach a screenshot to the PR if there are any visible changes
  3. If you make a new method, add a unit test for that
  4. A computed property may be better than a function for the disabled boolean

@yugantarjain
Copy link
Contributor

@ednofedulo @aaryankotharii confirmed, Mentorship iOS is participating in Hacktoberfest! Thanks

@yugantarjain yugantarjain added Hacktoberfest and removed Status: Available Issue was approved and available to claim or abandoned for over 3 days. labels Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. good first issue Good for newcomers.
Projects
None yet
3 participants