Closed janvanderhaegen closed 8 years ago
I was just thinking the same thing. I am new to aurelia-validation, but If you create the validator against a bound model ideally there should be a .off( ) or .destroy( ) you can call on detach of a component. I do this for model observers and event subscribers in view-models
This is pretty serious, and makes the plugin unusable if you use some properties with dirty checking. Any updates or workarounds?
I see that commit https://github.com/aurelia/validation/commit/2187489aae24c4b714addb2d1d29e4b81c649b6f addresses this bug. Just to note, shouldn't the dependency subscriptions be cleared as well?
Thanks for submitting this / commenting on this. At this time we are closing this because we have completely re-written and are deprecating the previous feature set. If you feel this should be re-opened please feel free to review this blog post and submit either again on this repository, or on the new validatejs bridge repository
Thanks again!
Since aurelia/validation depends on observers, there should be a proper way to clean up (destroy) a validation when it is no longer needed.