title: How to validate an array?
body: <p>I am trying to use <a href="https://github.com/ericmbarnard/Knockout-Validation" rel="noreferrer">knockout validation lib</a> to validate an array of objects. It is not straightforward to me how to form a validation group for an array of observables. The only way I managed to make it work is like this (<a href="http://jsfiddle.net/KHFn8/332/" rel="noreferrer">JSFIDDLE included</a>):</p>
  
  <pre><code>var Note = function () {
      var self = this;
      self.name = ko.observable().extend({ required: true });
  };
  
  var viewModel = function() {
      var self = this;
  
      self.notes = ko.observableArray([new Note(), new Note()]);
  
      self.validatedObservables = function() {
          var arr = [];
          ko.utils.arrayForEach(self.notes(), function(note) {
              arr.push(note.name);
          });
          return arr;
      };
  
      self.errors = ko.validation.group(self.validatedObservables());
  
      self.submit = function () {
          if (self.errors().length != 0) {
              self.errors.showAllMessages();
          }
      };
  
  };
  
  ko.applyBindings(new viewModel());
  </code></pre>
  
  <p>It seems like my approach is unnecessarily verbose. According to the source code you can  simply pass an observable to ko.validation.group:</p>
  
  <pre><code>self.errors = ko.validation.group(self.notes());
  </code></pre>
  
  <p>But this doesn't work.</p>