title: Applying knockout validation grouping to observablearray
body: <p>I'm trying to use group Knockout Validation on an observable array. I want to enable the submit button only when every array item validates successfully.</p>
  
  <p>I'm not sure where I'm going wrong. Can anybody suggest if I'm close based on the below? I've removed code pertaining to other features of the UI for brevity and left only the code that's relevant.</p>
  
  <p>I've also searched Stackoverflow for solutions but can't find one that addresses this specific issue.</p>
  
  <p>Please advise. Thanks.</p>
  
  <p><strong>Knockout</strong></p>
  
  <pre><code>    ko.validation.configure({
          registerExtenders: true,
          messagesOnModified: true,
          insertMessages: true,
          parseInputAttributes: true,
          messageTemplate: null,
          errorMessageClass: "input-notification error png_bg",
          grouping: {
              deep: true
          }
      });
  
      function Integer(integerValue) {
          this.integerValue = ko.observable(integerValue).extend({ number: true }).extend({ required: { message: 'Please enter an integer' } });
      }
  
      var viewModel = ko.mapping.fromJS(integerList, options);
  
      viewModel.integers = ko.observableArray([
          new Integer("0"),
          new Integer("0")
      ]);
  
      viewModel.errors = ko.validation.group(viewModel.integerlists);
  
      ko.applyBindings(viewModel);
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>        &lt;div data-bind="template: { name: 'integerTemplate', foreach: integers }"&gt;&lt;/div&gt;
          &lt;script id="integerTemplate" type="text/html"&gt;
              &lt;input class="text-box single-line text-input large-input" type="number" data-bind="value: integerValue, valueUpdate: 'afterkeydown', css: { error: !integerValue.isValid() }" required /&gt;
          &lt;/script&gt;
          &lt;button class="large-input wide" data-bind="click: save, enable: errors().length == 0"&gt;Sort Integers&lt;/button&gt;
  </code></pre>