kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

vue-validator inside v-if/s-show - working first time only #236

Closed murbanowicz closed 7 years ago

murbanowicz commented 8 years ago

Hi,

It is really strange. I am trying to create fiddle and it is giving similar results with point 2. I can't reproduce point 1 so far. https://jsfiddle.net/mariaczi/ca6vc6oo/2/

There is 2 issues. 1. I have a div with EDIT FORM. It has v-if="elementInEdit". There is only one validator for standard text field - required. When I first time open it - it is working. Next time when conditions will change and it will be gone and show up again - $validator is not existing anymore.

  1. $validator is not available outside
kazupon commented 8 years ago

1. I have a div with EDIT FORM. It has v-if="elementInEdit". There is only one validator for standard text field - required. When I first time open it - it is working. Next time when conditions will change and it will be gone and

Fixed.

  1. $validator is not available outside

In currently, when we disabled validator with v-if, and enable, it does not work at outside validator because limited of 2.x architecture. I'll try to improve this issue for 3.x (Vue 2.0 compatible)

Tinoooo commented 7 years ago

any news on this?

kazupon commented 7 years ago

released v3.0.0-alpha.1 https://github.com/vuejs/vue-validator/releases/tag/v3.0.0-alpha.1

Tinoooo commented 7 years ago

Could you include the bugfix in v2, too? v3 is alpha and not usable in production.