Skip to content

fix(signup): show multiple signup errors at once#3987

Merged
TheodoreSpeaks merged 4 commits intostagingfrom
fix/pw-validation-error
Apr 6, 2026
Merged

fix(signup): show multiple signup errors at once#3987
TheodoreSpeaks merged 4 commits intostagingfrom
fix/pw-validation-error

Conversation

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator

@TheodoreSpeaks TheodoreSpeaks commented Apr 6, 2026

Summary

Previously password validation errors would show up one at a time, causing frustration since users would attempt to alter their passwords multiple times. Altered code to append all errors and to push signup buttons down to make room for additional validation errors.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Validated on localhost that multiple validation errors show up at once

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

image

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 6, 2026 9:18pm

Request Review

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator Author

@BugBot review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 6, 2026

PR Summary

Low Risk
Low risk UI/API response messaging change that only aggregates validation errors; no changes to password reset or signup execution paths.

Overview
Improves auth form validation UX by showing all password validation failures at once instead of failing fast on the first error during reset-password and signup.

On the reset-password API, returns a single 400 message concatenating all Zod validation errors rather than only the first, and signup error-message containers were adjusted (removing absolute positioning) to make room for multiple inline errors.

Reviewed by Cursor Bugbot for commit 4d553ca. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4d553ca. Configure here.

@TheodoreSpeaks TheodoreSpeaks marked this pull request as ready for review April 6, 2026 21:28
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 6, 2026

Greptile Summary

This PR fixes a UX bug where password validation errors appeared one at a time, requiring multiple form submissions to discover all issues. The fix collects all errors before displaying them, applied consistently across the signup flow and the reset-password flow.

  • signup-form.tsx: Removed a redundant inner block that was overwriting the complete error arrays with only the first element ([errors[0]]); also removed absolute right-0 left-0 z-10 from error containers so they push the submit button down rather than overlaying it
  • reset-password-form.tsx: Replaced validationMessage: string with validationMessages: string[], collecting all errors before calling setValidationMessages
  • route.ts: API now returns all Zod validation errors joined into one string rather than only the first
  • route.test.ts: Updated test passwords to include a special character (!) so token-validation tests are not conflated with password errors; updated assertions to toContain for the concatenated multi-error format

Confidence Score: 5/5

Safe to merge — straightforward UX improvement with no behavioral regressions

All findings are P2 style suggestions. The core logic correctly collects all validation errors before returning, tests are updated appropriately, and no regressions are introduced in the primary flows.

route.ts line 29 — minor separator choice for joined error messages; reset-password-form.tsx — validation errors not cleared on input change

Important Files Changed

Filename Overview
apps/sim/app/(auth)/reset-password/reset-password-form.tsx Refactored from single validationMessage string to validationMessages array to display all errors simultaneously
apps/sim/app/(auth)/signup/signup-form.tsx Removed redundant first-error-only setters inside early return block; removed absolute positioning from error containers to allow normal document flow
apps/sim/app/api/auth/reset-password/route.ts Changed API error response from single first error to all validation errors joined by space separator
apps/sim/app/api/auth/reset-password/route.test.ts Updated test passwords to include special character and assertions to use toContain for multi-error response format

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User submits password form] --> B{Collect ALL validation errors}
    B --> C{errors.length > 0?}
    C -- Yes --> D[setValidationMessages with full array]
    D --> E[Display all error messages simultaneously]
    E --> F[User corrects issues]
    F --> A
    C -- No --> G[Clear errors and proceed]
    G --> H{API Zod validation}
    H -- Fail --> I[Join all errors with space separator, return 400]
    H -- Pass --> J[Execute password reset or signup]
Loading

Reviews (1): Last reviewed commit: "Fix unit tests" | Re-trigger Greptile

@TheodoreSpeaks TheodoreSpeaks merged commit 7e0794c into staging Apr 6, 2026
11 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/pw-validation-error branch April 6, 2026 23:15
emir-karabeg pushed a commit that referenced this pull request Apr 7, 2026
* fix(signup): show multiple signup errors at once

* Fix reset password error formatting

* Remove dead code

* Fix unit tests

---------

Co-authored-by: Theodore Li <theo@sim.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant