Prevent File from adding properties into form fields
Open
Nobody has claimed this yet.
v1
v2: needs investigation
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
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
- create a form
- add a validation for a file (for example
z.file()) - 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
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproducible example in src/App.tsx and the form validation using z.file(). Check how the file field is represented for autocomplete, then verify that only the file field appears and its properties are excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100