Closed szkrd closed 8 years ago
I could "make it work" with async, but it kinda feels like a hack. https://jsfiddle.net/szabi/Lk9nmfed/2/
It seems that when the validatorForUserName
variable is changed to ['theBacon']
from ['theCheese']
, the former validator is not removed, i.e. there are actually two validators ['theCheese', 'theBacon']
on that input field after that change. This can be observed by adding a line of html <pre> {{ $validation1 | json }} </pre>
to @szkrd 's jsfiddle.
@kazupon , I know you're busy developing the 3.0 version, but this may can be solved by adding a few lines of cleaning up code in proper place if my guess is right.
hi~ @kazupon the same issue still appeared in v3.0.0-alpha.2, i have try the example in https://github.com/kazupon/vue-validator/commit/b5d5487 , but it not work
I'm trying to toggle a custom validator, but it seems to be impossible.
vue & vue-validator version
vue-validator v2.1.3, Vue.js v1.0.26
Reproduction Link
jsFiddle: https://jsfiddle.net/szabi/5ypnz9wg/
Steps to reproduce
enter "cheese" in username input, click "bacon" button, replace text in field with "bacon"
What is Expected?
valid form
What is actually happening?
invalid form