私の目標は、ビューモデルのコレクションの一部であり、foreach バインディング内で可視化された入力に、ノックアウトが必要なバリデーターを適用することです。これが私がこれまでに持っているものです-エラーは常に0に評価され、ここでどこが間違っているのかわかりません。
   var vm = {
    myCollection: myCollection,  <-- im binding the foreach onto this property, and consists of a collection of Items
    submit: function () {
        if (vm.errors().length == 0) {
            alert('Thank you.');   <-- errors is always 0
        } else {
            vm.errors.showAllMessages();
            app.showMessage('There were some errors...', '');
        }
    }
};
 var Item = function (data) {
        self.name = ko.observable().extend({ required: true });
 }
vm["errors"] = ko.validation.group(vm);
<div data-bind="foreach: myCollection">
<input type="text" 
data-bind="value: name,
validationOptions: {errorElementClass: 'input-validation-error' }" />