amupedia2021 / amupedia-web

Source code of the website.
https://www.amupedia.site/
MIT License
163 stars 177 forks source link

šŸž [BUG] -Error submitting contact form #565

Closed BhavinRaichura closed 1 year ago

BhavinRaichura commented 1 year ago

Description

Currently, there is a critical bug in the form validation code within the form submit handler, causing the form validation process to malfunction. As a result, the form fails to get validated, preventing it from being processed further and leading to unsuccessful form submissions.

Current behaviour

  1. Clicking the submit button does not trigger the form submission API call.
  2. The form validation process within the submit handler is preventing even valid form data from passing the validation check.
  3. As the handler fails to call the API, the form does not reach the backend, and no response is received, leaving users unaware of the form's status.

Expected behaviour

When users click on the submit button, the form submit handler should correctly trigger the form validation process. Before proceeding with the form submission API call it should do a thorough check to ensure that all required fields are valid and complete. If there are validation errors, the form submission should be stopped, and appropriate error messages should be displayed, otherwise the submit API will be called and saved on the backend.

Reproduction steps

1. Go to the form submission page on the website.
2. Fill in the form fields with correct data.
3. Attempt to submit the form.
4. See error

Screenshots

Contact form

Not working

handler code

Incorrect code to handle form validation

code input number

Incorrect input type for mobile number

I am eager to contribute to resolving this bug and request the assignment of this task to me

Logs

No response

Browsers

Firefox

OS

Linux

Are you contributing for a program ?

Other

Code of Conduct

github-actions[bot] commented 1 year ago

Hello @BhavinRaichura! Thank you for raising this issue.

Please make sure to follow our Contributing Guidelines. šŸ’ŖšŸ» Don't forget to ā­ our Project-Amupedia. šŸ“”

Our review team will carefully assess the issue and reach out to you soon! šŸ˜‡ We appreciate your patience! šŸ˜€

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 7 days since being marked as stale.