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

Add max file size validation to va-file-input #3762

Open
kylesoskin opened this issue Jan 30, 2025 · 3 comments
Open

Add max file size validation to va-file-input #3762

kylesoskin opened this issue Jan 30, 2025 · 3 comments

Comments

@kylesoskin
Copy link

What

We are on the 526 team and want to update our components to V3 components, specifically the file input component to start.

Purpose

This component accepts files from the user.

Usage

The current forms library component being used supports a max_file_size validation, we would like the V3 one to too.

Behavior

It should behave exactly as it does now, but also support an error state for files exceeding an arbitrary file max size, as defined by the user.

Examples

Image

Accessibility

Guidance

Collaboration Cycle Ticket

I am not aware what this is but will look into it and try to figure out what to do here and edit it in.

Your team

Disability Benefits Team (526ez, CARBS, Team 2)

Research (optional)

Code (optional)

Next steps

You may present your work to the Design System Council at an upcoming meeting. If you do not or cannot attend the Design Council Meeting, you can opt to get an asynchronous approval.

Submit requests to join an upcoming Design System Council meeting in #platform-design-system.

During the meeting, the Design System Council Working Group will evaluate the request and make a decision.

If your request is approved, you can add your component or pattern to the system. If you have any questions on how to add your component or pattern to the system, please reach out to the Design System Team at #platform-design-system.

@kylesoskin kylesoskin added experimental_design Design System experimental design requests platform-design-system-team labels Jan 30, 2025
@humancompanion-usds humancompanion-usds added the enhancement New feature or request label Jan 30, 2025
@caw310
Copy link
Contributor

caw310 commented Jan 30, 2025

@kylesoskin This seems more like an enhancement than an experimental design request.

@humancompanion-usds humancompanion-usds changed the title Experimental Design [File Input] Add max file size validation to va-file-input Jan 30, 2025
@humancompanion-usds
Copy link
Collaborator

@caw310 - I chatted with Kyle. This is an enhancement. I'd like to get this prioritized as it is functionality I was not aware of which lived in the Forms Library. Thus we should be able to refer to that code and pull this into the component itself fairly easily (famous last words). Thanks!

@humancompanion-usds humancompanion-usds removed the experimental_design Design System experimental design requests label Jan 30, 2025
@caw310 caw310 removed their assignment Jan 30, 2025
@Andrew565
Copy link
Contributor

I think adding a file.size check here might work for this? Note that file.size is an integer representation of the file size in 'bytes', just to keep that in mind when implementing the maxFileSize prop and guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants