Knockout-Validation
Knockout-Validation copied to clipboard
Element is not decorated on dynamic observables
Please refers to http://jsbin.com/mudeko/4/edit?html,js,output for a live demo
Steps to recreate:
- Click on Add Activity Type
- Click on Save
the form is invalid but the element is not decorated.
However, this is working on the initial binding:
- Reload the page
- Click on Save
the form is invalid and the element is decorated.
Seems that the binding is detached on the following reassignments.
@jd78 There are some issues related to that and I'll get with an update on this once I find more time.
Until then, a quick fix is to use the with
binding.
http://jsbin.com/hiyirokeva/2/edit
Thanks @crissdev, I can use the with binding for now.
Thanks. I encountered this issue today as well. http://jsfiddle.net/k0qyn8z2/ shows the problem as well as the successful "with" binding workaround mentioned above.