I\'m trying to attach validation to a mapped view. I\'m using Knockout Mapping and Validation plugins. Pseudo-models:
Person { int Id; string Name;
Another way is to extend the observable after it has mapped.
function viewModel() { var self = this; self.persons = ko.observableArray(); // persons are retrieved via AJAX... ko.mapping.fromJS(persons, {}, self.persons); self.Name.extend({ required: true }); }