ericmbarnard/Knockout-Validation — Issue #24: adding validation to array items
Author: cstavro
Created: 2012-02-06 20:29:16+00:00
State: open

I've been working on adding validation to new items dynamically added to an array of items and I'm having a bit of an issue.

http://jsfiddle.net/gFzQE/

In the fiddle you'll see 3 buttons:
addWorks adds an item and adds the validation before pushing it into the array

addFails pushes the item into the array and then adds validation

addFails2 pushes the item into the array and then loops through all items in the array to add validation

Am I doing something wrong with these 2 failing methods by trying to add validation after it's been added to an observable array or is this a bug?