Skip to content

[Enhancement]: Harden Upload form client-side validation #69

@tomvothecoder

Description

@tomvothecoder

Is your feature request related to a problem?

This is a pre-release hardening effort for the Upload form. Some validation already exists, but it should be more carefully reviewed, tested, and made consistent. Backend validation logic should remain unchanged; frontend validation should mirror existing backend constraints where possible.

Describe the solution you'd like

Strengthen and more carefully audit the existing client-side validation in the Upload form, building on the current implementation.

Specifically:

  • Review and tighten required field checks to ensure they are consistently enforced
    • Metadata field not working correctly (refer to comment)
  • Improve validation of input formats where applicable (URLs vs URIs, JSON validity, date fields and ordering)
  • Ensure validation logic is aligned with backend constraints (refer to FastAPI models)
  • Display clear, inline, field-level validation messages
    • Duplicate simulations -- check simulation name in the database when user types it in
    • Incorrect entries for GitHub URL
    • Incorrect entries for output path URL (must be public URL or HPC filepath)
  • Provide a top-level validation summary when multiple issues are present
    • Display errors in the review and submit
  • Prevent submission when validation fails (e.g., disable submit button)

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions