Summary:
The feedback form validation logic is incorrect and references non-existent form objects, so validation does not work reliably. In practice, valid emails are treated as invalid, and invalid emails can still get submitted.
Description:
The validation script reads from patient and doctor forms, but the actual form name is feedback. Also, the regex condition is reversed:
- If email matches format, it shows invalid message.
- If email does not match format, it returns true.
This causes incorrect behavior and potential JS runtime errors.
Steps to Reproduce:
- Open feedback page.
- Enter a valid email (example : user@example.com
- Submit form.
- Observe invalid message or JS error.
- Try invalid email and submit; it can pass.
Expected:
Only invalid emails should be blocked, valid emails should submit.
Actual:
Validation is inverted and references wrong form names.
Impact:
User-facing bug, bad UX, and weak input validation before reaching backend.
Summary:
The feedback form validation logic is incorrect and references non-existent form objects, so validation does not work reliably. In practice, valid emails are treated as invalid, and invalid emails can still get submitted.
Description:
The validation script reads from patient and doctor forms, but the actual form name is feedback. Also, the regex condition is reversed:
This causes incorrect behavior and potential JS runtime errors.
Steps to Reproduce:
Expected:
Only invalid emails should be blocked, valid emails should submit.
Actual:
Validation is inverted and references wrong form names.
Impact:
User-facing bug, bad UX, and weak input validation before reaching backend.