New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable #3760
Comments
Are you sure? I can't see anything in the example related to inputs. |
Are you sure? Here is the code example from codesandbox. You have to select a file. It doesn't throw errors if I use it without the
|
Yea the example doesn't have that code. At least for me, anyways copied your code there and i can see the problem now.
<Field
name="formFile"
type="file"
v-slot="{ meta, handleChange }"
>
<input
@change="handleChange"
type="file"
class="form-control"
:class="{
'is-valid': meta.valid && meta.touched,
'is-invalid': !meta.valid && meta.touched,
}"
>
</Field> I will keep this open to think about if vee-validate should handle this case if you pass |
Thank your very much! It works :) Sounds good, if you change the binding or mention this in the documentation. |
I decided to mark this as a bug since clearly some conditions didn't work as expected. Fixed in 3c76bb2 |
What happened?
I want to validate a input file field and validate this with the vee-validate. But If I choose a file I get this error message. I think the codesandbox example show it very well.
Reproduction steps
No response
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://codesandbox.io/s/mystifying-mclaren-orjrti?file=/src/components/HelloWorld.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: