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

Prevent invalid files in online validator file selection #45

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

mint-thompson
Copy link
Collaborator

A file may be submitted to the online validator by drag-and-drop or by using a file selection window. In both cases, prevent the submission of files that are not one of the accepted types, and show an error when the file is not one of the accepted types.

Problem

When a file that is not an allowed type is submitted to the online MRF validator using the file selection window, no error message appears. Instead, the "loading" message appears and remains on screen.

Solution

Move the validation to the onChange event so that it occurs regardless of the user interaction mode.

Test Plan

Submit an invalid file (such as .xlsx) to the online MRF validator using drag and drop and using the file selection window. In both cases, the same error message should be displayed indicating that this file is not one of the allowed types.

A file may be submitted to the online validator by drag-and-drop or by
using a file selection window. In both cases, prevent the submission of
files that are not one of the accepted types, and show an error when the
file is not one of the accepted types.
Copy link
Collaborator

@shaselton-usds shaselton-usds left a comment

Choose a reason for hiding this comment

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

Thank you!

@shaselton-usds shaselton-usds merged commit 45c0ea2 into main Jul 31, 2024
4 checks passed
@shaselton-usds shaselton-usds deleted the prevent-invalid-file-selector branch July 31, 2024 21:06
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.

2 participants