require SN for UBC students - #534
Draft
ahosseini06 wants to merge 1 commit into
Draft
ahosseini06 wants to merge 1 commit into
ahosseini06 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ahosseini06
marked this pull request as draft
September 11, 2026 19:22
ahosseini06
force-pushed
the
enforce-ubc-student-number
branch
from
September 11, 2026 19:26
b2be06d to
7e38c95
Compare
The onboarding Zod schema left studentNumber optional for everyone, so UBC students could reach the POST /profiles call with an empty value and get a 406 from the backend. Enforce the same rule the backend and the membership form use: UBC students must enter exactly 8 digits, other students may leave it blank but any value must be numeric. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012NWdgq8oozGXrwiukGFUtv
ahosseini06
force-pushed
the
enforce-ubc-student-number
branch
from
September 11, 2026 19:32
7e38c95 to
5ca8cce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
studentNumberas optional for everyone, so a UBC student could submit the questionnaire with no student number and get a 406 fromPOST /profiles.onboardingValidationSchemanow requires exactly 8 digits wheneducation === "UBC". Other students may leave it blank, but any value entered must be numeric.createhandler enforces and the rulemembershipValidationSchemaalready uses on the membership page.Behaviour
studentNumberafter education is chosen and jumps back to step 1 on failure, so the error surfaces under the field before the request is sent.Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_012NWdgq8oozGXrwiukGFUtv