sef-global / scholarx-frontend

This is the frontend of the ScholarX
MIT License
5 stars 58 forks source link

Contact number field validation required on "Become a Mentor" form #196

Closed dilankavishka closed 1 month ago

dilankavishka commented 1 month ago

The contact number field in the "Become a Mentor" form allows users to enter strings or non-numeric input, and the form proceeds to the next step without validation. The form should not proceed unless a valid contact number is entered.

Describe the bug The contact number field does not validate input properly. It accepts strings or any unfair input, allowing the user to go to the next step without proper validation.

To Reproduce Steps to reproduce the behavior:

  1. Go to the "Become a Mentor" form on ScholarX.
  2. Fill out the form, and in the contact number field, enter a string (e.g., "abcdef").
  3. Proceed to the next step of the form without receiving an error message.

Expected behavior The form should prevent the user from moving to the next step until the contact number is valid (i.e., contains only numbers).

Screenshots Screenshot (38)

Are you working on it? Yes/No

shiv-0101 commented 1 month ago

Hey buddy🙌

Seems like interesting to work on. One more thing, do you also want the contact number to have specific digits or 10 only..

dilankavishka commented 1 month ago

@shiv-0101 it's not necessary to restrict it to a specific number of digits since our mentors come from various countries with different number formats. So, as long as we validate for numeric input, that should be sufficient.

shiv-0101 commented 1 month ago

Hey Buddy

Is there anything else that need correction apart from step 1's contact no. validation issue?

dilankavishka commented 1 month ago

@shiv-0101 if you've done this part, you can make the PR. and you can get try to fix another issue that we've created.

shiv-0101 commented 1 month ago

Not merged yet!! all good?