aurelia / validatejs

Enables expressive validation using decorators and/or a fluent API.
MIT License
22 stars 23 forks source link

Binding behaviour throws error when leaving active shell with validations #113

Closed suamikim closed 8 years ago

suamikim commented 8 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: I've implemented some validations based on the latest blog post and the appendant gist.

The validations are added to a login view which lives inside its own shell. When leaving this shell to the main app shell, the file validate-binding-behavior.js throws an error Cannot read property 'target' of undefined in line 55.

Do I somehow have to unregister the validations manually or is this a bug?

Here's a runable gist which throws the error when submiting the form: https://gist.run/?id=80e8325e62a7502e5a54e5c148e8c011

jdanyow commented 8 years ago

try running this.controller.reset() before switching the app root.

updated validation gist with new bits: https://gist.run/?id=3625244afe4f188785190b23f2e7f472