Skip to content

Prevent File from adding properties into form fields #1938

@darklight9811

Description

@darklight9811

Describe the bug

When we add a field to the form validator, it adds all properties from the file object into the form fields, this really messes up the auto complete and seems unnecessary.

Your minimal, reproducible example

https://stackblitz.com/edit/vitejs-vite-hw3jlbst?file=src%2FApp.tsx

Steps to reproduce

  1. create a form
  2. add a validation for a file (for example z.file())
  3. try to auto complete a field with the name of the file

Expected behavior

Only show the file field itself, not its properties

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

  • OS: Windows 11
  • VSCode

TanStack Form adapter

react-form

TanStack Form version

1.27.3

TypeScript version

5.9.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions