anitab-org / mentorship-ios

THIS PROJECT IS ARCHIVED. Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the iOS application of this project.
GNU General Public License v3.0
14 stars 28 forks source link

Add validation for empty name in edit profile. #139

Open aaryankotharii opened 3 years ago

aaryankotharii commented 3 years ago

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 :

ednofedulo commented 3 years ago

can i work on this?

ednofedulo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

aaryankotharii commented 3 years ago

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 commented 3 years ago

Got it, thanks!

yugantarjain commented 3 years ago

@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 commented 3 years ago

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