Skip to content

Fix: Prevent invalid manual entries in college input (#210)#325

Merged
indresh404 merged 1 commit into
indresh404:mainfrom
Adi-Marathe:fix-issue-210
Jun 6, 2026
Merged

Fix: Prevent invalid manual entries in college input (#210)#325
indresh404 merged 1 commit into
indresh404:mainfrom
Adi-Marathe:fix-issue-210

Conversation

@Adi-Marathe
Copy link
Copy Markdown
Contributor

Fix: Prevent invalid manual entries in college input

Closes #210

Description

This PR resolves an issue in the onboarding form where users could bypass validation and submit invalid manual entries for their college.

Previously, the form only validated the underlying selectedCollege state. If a user first clicked a valid college from the dropdown, but later typed an invalid entry in the input box, the form would pass validation using the old selectedCollege value and submit it. This created a discrepancy between what the user saw (their invalid entry) and what was actually submitted.

Changes Made

  • Updated the submission validation in src/pages/Onboarding.jsx to ensure that the current search text (collegeSearch) strictly matches the internally tracked selectedCollege.
  • Added the selectedCollege !== collegeSearch condition to correctly block the submission and alert the user when they have typed an unselected value.

Proof of Fix

RankerHub.Gamified.Developer.Leaderboard.mp4

@Adi-Marathe Adi-Marathe requested a review from indresh404 as a code owner June 4, 2026 12:14
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview, Comment Jun 6, 2026 10:21am

@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review labels Jun 4, 2026
@indresh404
Copy link
Copy Markdown
Owner

Fix conflict

@Adi-Marathe
Copy link
Copy Markdown
Contributor Author

Hello @indresh404
All CI checks passing ✅. Merge conflict resolved. Vercel preview failure is an environment configuration issue on the deployment project, unrelated to this PR's changes. Ready for review!

@indresh404
Copy link
Copy Markdown
Owner

If your PR still shows the old failed Vercel check, please rebase (or merge the latest main branch into your branch) and push again to trigger a fresh deployment/check run.

@Adi-Marathe
Copy link
Copy Markdown
Contributor Author

Hello @indresh404
All issues are solved now
Please review this

@indresh404 indresh404 merged commit 3a22e5b into indresh404:main Jun 6, 2026
10 checks passed
@Adi-Marathe Adi-Marathe deleted the fix-issue-210 branch June 6, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 level3 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Onboarding College Manual Input Validation Leak

2 participants