Cannot clear rules dynamically
dragantl opened this issue · comments
vue & vue-validator version
1.0.28, 2.1.6
Reproduction Link
https://jsfiddle.net/ek3nffcd/5/
Steps to reproduce
- Enter text into
bar
to remove it as an error factor (added 2nd filed to have at least one validation present) - Note that
foo
is not required when run initially - Check the checkbox
foo
is now required- Un-check the checkbox
- Foo is still required
- Enter text into
foo
- Check the checkbox
- Remove text from
foo
- Un-check the checkbox
What is Expected?
After step 4, I expect form to become valid because foo
is no longer required
After step 6, I would expect some change... seems validation doesn't occur at all
After step 9, I again expect the form to be valid
What is actually happening?
It seems that the removal of validation does nothing. In my project, I want to toggle a checkbox that would add/remove validation from certail fieldset
while making that fieldset disabled (not hiding it). However, when fields are enabled, there is no way to remove their validation requirement afterwards.