Replies: 1 comment
-
Not sure if I remember actually, but it doesn't break tests so I assume it is fine to remove that part of the check. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm trying to create some kind of dynamic rules which are based on "disabled" status/prop.
https://stackblitz.com/edit/nkppnz?file=src%2FInputText.vue,src%2FApp.vue,src%2FuseRules.js&startScript=dev
But I have some issue with rules passed as function. I believe the culprit here is this line:
vee-validate/packages/vee-validate/src/useField.ts
Line 335 in 3130470
What is the reason here for checking if
rules
is the function inif
instead of watcher body here ? Because as far as I understand now when the initialrules
during initialization ofuseField
is an function then the reactivity of rules is disabled causing the change of rules ref to something else not triggering re-validation.@logaretm
Cheers
EDIT:
When I "patched" it that way it seems to work correctly, but I'm not sure if there are any side effects here ?
https://stackblitz.com/edit/nkppnz-du3fu1?file=src%2FInputText.vue,src%2FApp.vue,src%2FuseRules.js,src%2Fmain.js&startScript=dev
Beta Was this translation helpful? Give feedback.
All reactions