Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instrument_builder] Improve error message specificity for file upload #9682

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GeorgeMurad
Copy link
Contributor

Brief Summary of Changes

  • Improved error message handling for file uploads in Instrument Builder.
  • Now provides specific error messages for:
    • Invalid extension. Only .linst files are allowed.
    • Spaces are not allowed in the file name.
    • Special characters are not allowed (only letters, numbers, and _).
    • Multiple periods in the file name are not allowed.
    • File name cannot end with a special character.

Testing Instructions

  1. Try uploading different files with:

    • Valid names (validFile.linst) → Should succeed.
    • Names with spaces (my file.linst) → Should show "Spaces are not allowed."
    • Names with special characters (file@name.linst) → Should show "Special characters are not allowed."
    • Names with multiple periods (file.name.linst) → Should show "Multiple periods in the file name are not allowed."
    • Names ending with special characters (file_.linst) → Should show "File name cannot end with a special character."
  2. Click "Load Instrument" after selecting a valid file → Should display a success message.

Additional Notes

  • No changes were made to backend logic.

  • This ensures better user experience and validation.

  • Run:

npm run compile

Link(s) to related issue(s)

@GeorgeMurad GeorgeMurad changed the title f[instrument_builder] Improve error message specificity for file upload [instrument_builder] Improve error message specificity for file upload Mar 5, 2025
@GeorgeMurad GeorgeMurad added Category: Feature PR or issue that aims to introduce a new feature Module: instrument_builder PR or issue related to instrument_builder module Language: Javascript PR or issue that update Javascript code labels Mar 5, 2025
@GeorgeMurad GeorgeMurad added the 27.0.0 - Bugs Bugs Found in LORIS 27 testing label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing Category: Feature PR or issue that aims to introduce a new feature Language: Javascript PR or issue that update Javascript code Module: instrument_builder PR or issue related to instrument_builder module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant