ericmbarnard/Knockout-Validation — pull request #163 by IanYates83 (2012-11-07 16:09:04+00:00)
Title: ko.validation.group resolves computed values

I had an issue with one of my computed observables being resolved on creation, even though deferEvaluation was set to true.

Example: When the computed is resolved, it sets Value to "yes":
http://jsfiddle.net/IanYates83/jyVAL/3/
Note that "deferEvaluation" is true, but the computed is still resolved. Commenting out the ko.validation.group line leaves Value as "no".

I eventually traced the issue to validation.group resolving the unwrapping the "observable", regardless of the source.
The fix I propose is to explicitly not traverse computed observables.

Same example, with fix in place:
http://jsfiddle.net/IanYates83/jyVAL/

I'm hoping that this change doesn't change any functionality others rely on. All tests work with this code change, and this bug explicitly states that "validating computed observables is probably something we don't want to do going forward": https://github.com/ericmbarnard/Knockout-Validation/issues/86