-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
useVuelidate doesn't signal that it unwraps the validation ref when used in a template #1217
Comments
This doesn't have an issue. So, I'm confused about what this is exactly referring to. However, what does error is the issue of export interface ErrorObject {
readonly $propertyPath: string
readonly $property: string
readonly $validator: string
readonly $message: string | Ref<string>
readonly $params: object
readonly $pending: boolean
readonly $response: any,
readonly $uid: string,
}
The issue with doing something like My best advice in this case would be to remove the Ref from that type and ensure that the $errors object is either a ref or reactive already -- no use in wrapping it (I'm pretty sure!) This particular issue I'm noting is not directly related to the original issue. But its a large issue for Vuetify apps! I am fully willing to make any modifications to the lib, but I need to know if its okay, considering it could be a breaking-change bug |
The issue is trying to access any property results in that error, which is just not great for DX. |
Make sure that you are familiar with documentation before submitting an issue.
https://vuelidate-next.netlify.com/
Describe the bug
When attempting to access a property in a vuelidate validation "form" in the template (like in a
v-if
), the validation ref doesn't get unwrapped according to TS.Reproduction URL
If need be, I'll share my project privately, as I have many things on there that I don't think are needed to be revealed to everyone.
To Reproduce
Steps to reproduce the behavior:
useVuelidate
(we'll call it v$ for the example), like:<p v-if="v$.name">
elementExpected behavior
The validation ref should get detected as unwrapped within the template
Screenshots
Provided above
Additional context
It doesn't actually break anything, however it is a bit annoying to work with.
The text was updated successfully, but these errors were encountered: