fix: add client-side validation to prevent goal target of 0 or less (#929)#1616
fix: add client-side validation to prevent goal target of 0 or less (#929)#1616mallya-m wants to merge 2 commits into
Conversation
|
@mallya-m is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
@Priyanshu-byte-coder PR ready! Added explicit client-side validation in handleCreate that catches target ≤ 0 before the API call and shows a clear error message. |
|
@Priyanshu-byte-coder all CI checks pass (Build, Lint, Type check, Dependency audit). The E2E failures are pre-existing infrastructure issues unrelated to this PR:
My change only adds client-side validation in |
|
This PR now has merge conflicts with |
|
This PR has merge conflicts with the current |
|
This PR has developed merge conflicts after recent merges to |
|
This PR has merge conflicts with |
|
This PR has merge conflicts. Please rebase on the latest main to resolve them — the feature/fix is approved for GSSoC scoring. |
|
This PR has merge conflicts with git fetch origin
git rebase origin/main
# resolve conflicts, then:
git push --force-with-lease |
|
This PR has merge conflicts with git fetch origin
git rebase origin/main
git push --force-with-lease |
|
This PR has merge conflicts with git fetch origin
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
|
This PR has merge conflicts with git fetch origin
git rebase origin/mainOnce you resolve the conflicts and CI passes, we can review for merge. |
f6359c4 to
a0be032
Compare
|
@Priyanshu-byte-coder rebased onto latest upstream/main — all conflicts resolved. Build , Lint , Type check. |
|
@Priyanshu-byte-coder re-applied the target validation fix after rebase — all conflicts resolved and fix is in place. Ready to merge! |
Summary
Closes #929
The progress bar NaN issue when target=0 was already guarded in the calculation, but users could still submit a goal with target=0. This PR adds explicit client-side validation that catches target ≤ 0 before the API call and shows a clear error message.
Type of Change
Changes Made
handleCreate— returns early with error message iftarget <= 0min={1}attribute and division guard already in the codebaseHow to Test
Checklist