Skip to content

[Bugfix:System] Fix Sign Up form clearing fields on error#12491

Closed
sushen123 wants to merge 1 commit into
Submitty:mainfrom
sushen123:fix/signup-form-field-clearing
Closed

[Bugfix:System] Fix Sign Up form clearing fields on error#12491
sushen123 wants to merge 1 commit into
Submitty:mainfrom
sushen123:fix/signup-form-field-clearing

Conversation

@sushen123

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Closes #12490

When email or user ID validation fails on the Sign Up form, the server-side redirect clears all fields, forcing users to re-enter everything. This is frustrating, especially when only one field is invalid.

What is the New Behavior?

Added client-side validation for email and user ID fields on the Sign Up form. Invalid inputs are now caught before the form submits, so the page stays put and all fields are preserved. Error messages match the existing server-side messages.

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Go to localhost:1511/authentication/create_account
  2. Fill in all fields
  3. Use an email with an unaccepted domain (e.g., [email protected]) → error toast appears, fields are preserved
  4. Use a user ID shorter than the minimum length → error toast appears, fields are preserved
  5. Verify that valid submissions still work normally

Automated Testing & Documentation

Other information

@IDzyre IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add to the Cypress tests to verify functionality.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 9, 2026
@aconfo
aconfo self-requested a review March 10, 2026 21:35
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 10, 2026
@aconfo aconfo self-assigned this Mar 10, 2026
@gherardi

Copy link
Copy Markdown
Contributor

@sushen123 are you actively working on this issue? If you're busy with other tasks, I’m happy to take it over and drive it to completion.

@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (2049e38) to head (aa31df6).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12491   +/-   ##
=========================================
  Coverage     21.66%   21.66%           
  Complexity     9638     9638           
=========================================
  Files           268      268           
  Lines         36233    36233           
  Branches        486      486           
=========================================
  Hits           7849     7849           
  Misses        27902    27902           
  Partials        482      482           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aconfo aconfo removed their assignment Mar 13, 2026
@aconfo
aconfo removed their request for review March 13, 2026 21:27
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Mar 28, 2026
@williamjallen

Copy link
Copy Markdown
Member

Closing due to inactivity.

@github-project-automation github-project-automation Bot moved this from In Review to Done in Submitty Development Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Fix Sign Up form clearing fields on validation error

5 participants