Skip to content

FileUpload: Per-file schema validation errors when multiple prop is true #5146

@gitcarter

Description

@gitcarter

Package

v4.x

Description

I'm having trouble showing per-file validation errors when a FileUpoad component has its multiple prop set to true.

Based on the With Form validation example in the docs, I've wrapped the image schema with z.array().min(1) to support multi-file uploads. I would expect each file in the files slot to show the corresponding error from the validation; however, the errors aren't propagated to the UI when form validation is triggered.

I created a full example of this.

There should be default behavior to show per-file errors when there's a schema prop set and multiple is set to true.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions