0
votes

Im using a knockout validation to create a custom validator and am trying us it with a viewmodel created with the knockout mapping plugin. The validation fires the first time I run the code but not when I click save or change a value in the inputs.

In the fiddle below im trying to to make sure LL is less than L and L is less than H. In the test data I have a L value that is less than LL so you can see there is one error reported, however when I correct the data in the input field the validator doesn't fire.

http://jsfiddle.net/davidoleary/quSpZ/

1

1 Answers

0
votes

Here is a working fiddle.

http://jsfiddle.net/quSpZ/4/

I restructured your code to have a ScheduleEntry object and moved the validation inside that object. That object is also set up to have observables for the properties so they will trigger the validation when they change.