Closed TanguyRiou closed 1 year ago
Describe the bug Within a react hook form if the MuiFileInput is required the validation does not work
To Reproduce Steps to reproduce the behavior: <Controller rules={{ required: true }} control={control} name={"consumptionFile"} render={({ field }) => ( <MuiFileInput required {...field} /> )} />
<Controller rules={{ required: true }} control={control} name={"consumptionFile"} render={({ field }) => ( <MuiFileInput required {...field} /> )} />
The form can't be submitted even when a file was set.
Screenshots
Hello !
Can you share a codesandbox plz ?
Describe the bug Within a react hook form if the MuiFileInput is required the validation does not work
To Reproduce Steps to reproduce the behavior:
<Controller rules={{ required: true }} control={control} name={"consumptionFile"} render={({ field }) => ( <MuiFileInput required {...field} /> )} />
The form can't be submitted even when a file was set.
Screenshots![image](https://user-images.githubusercontent.com/71505508/213715335-28a175ec-9e38-41d8-a7cd-55b25be56d04.png)