In my Vue.js application, I am utilizing Vuetify's v-file-input component. The file uploaded is connected to formData.file
and its validation is controlled by the rules
prop.
<v-file-input
:rules="fileValidationRules"
v-model="formData.file"
/>
When I upload a file like /tmp/foo.txt
, everything functions as expected. However, if I modify the content of this file and attempt to upload it again, the fileValidationRules
are not executed.
Evidently, this occurs because Chrome doesn't trigger the change event when the file name remains the same. Is there a way for me to overcome this issue so that each file selected by the user gets bound to formData.file
and triggers fileValidationRules
?