Skip to content

Fix Sign Up form clearing fields on validation error #12490

Description

@sushen123

Describe the bug
When a user fills out the Sign Up form and a server-side validation error occurs (e.g., invalid email, duplicate user ID, or unaccepted email domain), the page redirects back to the form and all fields (email, user ID, given name, family name) are cleared. The user has to re-enter everything from scratch.

Expected behavior
When validation fails, the form should retain the previously entered values so the user only needs to fix the invalid field.

To Reproduce

  1. Go to localhost:1511/authentication/create_account
  2. Fill in all fields (email, user ID, given name, family name, password)
  3. Use an email with an unaccepted domain (e.g., [email protected])
  4. Click "Sign Up"
  5. See error message — all fields are now cleared

Configuration

  • OS: Linux (Ubuntu 22.04 VM)
  • Browser: Chrome

Screenshots

Additional context
This happens because the form uses a server-side POST redirect pattern. When validation fails, it redirects back to the form without preserving the submitted values. Adding client-side validation for email and user ID fields (similar to the password validation added in #12455 ) would prevent unnecessary server round-trips and field clearing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions