viclafouch / mui-file-input

A file input designed for the React library MUI
https://viclafouch.github.io/mui-file-input/
MIT License
77 stars 17 forks source link

Yup Validation #24

Closed bryce-palmer closed 10 months ago

bryce-palmer commented 1 year ago

First of all thank you so much for this package I love the look and feel!

I am not sure if this is the right place for it but I was wondering if you had any examples of working with Yup validation when using React Hook Form? I am having trouble getting that to work vs the fieldState validation.

Thank you!

AngyDev commented 11 months ago

@bryce-palmer Can you share the error or the code that you are using? I'm using this package with react-hook-form and zod validation, it works fine. Below is the code that I'm using const schema = z.object({ file: z.instanceof(File) }); I don't know if it can be helpful.