Xa-el / FootyFriends

2 stars 3 forks source link

Acc info form accepts empty input fields #9

Closed AntonCSalvador closed 4 months ago

AntonCSalvador commented 4 months ago

Problem Description

The current implementation of the user registration (/register/info) form allows users to submit the form with empty input fields. This leads to incomplete or invalid user registrations, which can cause issues in user management and system integrity.

Expected Behavior

The registration form should validate that all required fields are filled out before allowing the user to submit the form. If any required field is left empty, the form should display a clear message indicating which fields need to be completed and prevent the form submission until corrected.

Steps to Reproduce

  1. Go to the /register/info page.
  2. Leave all input fields (e.g., username, password, pfp) empty.
  3. Click 'Done'

Make it so they need to fill, prob by chcking if the current input is just "". Also, we need to think about unique display names

fabiannxt commented 4 months ago

Hi, I would like to contribute to this Issue. I already checked the Input for contend and it now gives a console.log when the Input is empty. I also chained the "goToHome" function to a successful Profile Edit

fabiannxt commented 4 months ago

If you agree, I would send you a Pull Request

AntonCSalvador commented 4 months ago

Sounds good @fabiannxt ! Submit a pull request and thank you