If you want to work around the IE8 compatibility, then you can return true
from your Validate
functions.
this.ValidateSetup = function () {
if (this.Setup() > 30) {
alert('Invalid SetupTime');
}
return true;
}
Here is a sample: http://jsfiddle.net/rniemeyer/FfNqv/ (jsFiddle has some issues itself in IE8 mode, so you can run http://jsfiddle.net/rniemeyer/FfNqv/show/)
A better approach though would likely be to use a manual subscription. This is a good option for executing code whenever a single observable changes. The same could be done in a computed
as well, which allows you to depend on multiple observables.
With a manual subscription you would do:
<input id="Text3" data-bind="value: Setup"/>
In your view model, you would something like:
this.Close = ko.observable(data.CloseTime);
this.Close.subscribe(function(newValue) {
if (newValue > 30) {
alert('Invalid SetupTime');
}
//set other observables, or do whatever you like. "this" will be the this object.
}, this);