You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vuetify Version: 2.1.7 Vue Version: 2.6.10 Browsers: Chrome 78.0.3904.70 OS: Mac OS 10.15.1
Steps to reproduce
See codepen in the reproduction link.
Add a file in the first file input and the value parameter in the rules function is a File object. See console.
Add a file in the second file input and the File object is wrapped in an array. This should be the same as in step 1.
Expected Behavior
The value parameter of the rules functions should be a File object if you don't set the multiple property or set multiple to false.
Actual Behavior
If you don't set the multiple property, the value in the rules function is a File object as it should be. If you set multiple to false the value is an array which contains the File object.
Still relevant for 2.3.16.
If we have <v-file input :multiple="false" /> it won't allow you select multiple files (as $attrs passed directly to the input), but still wraps value in array, as property only checked for existence not truthiness.
Environment
Vuetify Version: 2.1.7
Vue Version: 2.6.10
Browsers: Chrome 78.0.3904.70
OS: Mac OS 10.15.1
Steps to reproduce
See codepen in the reproduction link.
Expected Behavior
The value parameter of the rules functions should be a File object if you don't set the multiple property or set multiple to false.
Actual Behavior
If you don't set the multiple property, the value in the rules function is a File object as it should be. If you set multiple to false the value is an array which contains the File object.
Reproduction Link
https://codepen.io/Aukemid/pen/BaawqEM
Other comments
I believe this is caused by VFileInput.isMultiple which only checks whether the multiple property exists. The following change works in my test cases.
The text was updated successfully, but these errors were encountered: